Fix attachment duplication on add
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { createSelector } from 'redux-orm';
|
||||
|
||||
import orm from '../orm';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const attachmentWithIdExistsSelector = () =>
|
||||
createSelector(
|
||||
orm,
|
||||
(_, id) => id,
|
||||
({ Attachment }, id) => Attachment.idExists(id),
|
||||
);
|
||||
Reference in New Issue
Block a user