fix realm error at group leaving

This commit is contained in:
Roman Volosovskyi 2016-10-21 10:46:51 +03:00
parent 2c72274025
commit 18452c9bd9
2 changed files with 3 additions and 5 deletions

View File

@ -96,8 +96,7 @@
(defn remove-contacts
[chat-id identities]
(let [contacts (get-contacts chat-id)]
(realm/write @realm/account-realm
#(delete-contacts identities contacts))))
(delete-contacts identities contacts)))
(defn save-property
[chat-id property-name value]

View File

@ -49,6 +49,5 @@
(defn delete-by-chat-id
[chat-id]
(realm/write @realm/account-realm
#(realm/delete @realm/account-realm
(get-by-chat-id chat-id))))
(realm/delete @realm/account-realm
(get-by-chat-id chat-id)))