Fix attachment duplication on add
parent
3e85371da9
commit
ce39b584ca
@ -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),
|
||||
);
|
||||
Loading…
Reference in New Issue