Fix attachment duplication on add

This commit is contained in:
Maksim Eltyshev
2020-04-23 05:56:02 +05:00
parent dc66a93e18
commit cb2f795ef1
8 changed files with 36 additions and 7 deletions
+11
View File
@@ -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),
);