mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 11:38:30 +02:00
✨ Improve options handling on db module
This commit is contained in:
parent
6bff6d24b9
commit
0a77bae8a7
5 changed files with 41 additions and 23 deletions
|
@ -899,7 +899,7 @@
|
|||
(assoc :file-id file-id)
|
||||
(d/update-when :media-id lookup-index)
|
||||
(d/update-when :thumbnail-id lookup-index))
|
||||
{:on-conflict-do-nothing overwrite?}))))
|
||||
{::db/on-conflict-do-nothing? overwrite?}))))
|
||||
|
||||
(doseq [item (:thumbnails @*state*)]
|
||||
(let [item (update item :media-id lookup-index)]
|
||||
|
@ -909,7 +909,7 @@
|
|||
:object-id (:object-id item)
|
||||
::l/sync? true)
|
||||
(db/insert! conn :file-tagged-object-thumbnail item
|
||||
{:on-conflict-do-nothing overwrite?})))))
|
||||
{::db/on-conflict-do-nothing? overwrite?})))))
|
||||
|
||||
(defn- lookup-index
|
||||
[id]
|
||||
|
|
|
@ -729,7 +729,8 @@
|
|||
(role->params role))]
|
||||
|
||||
;; Insert the invited member to the team
|
||||
(db/insert! conn :team-profile-rel params {:on-conflict-do-nothing true})
|
||||
(db/insert! conn :team-profile-rel params
|
||||
{::db/on-conflict-do-nothing? true})
|
||||
|
||||
;; If profile is not yet verified, mark it as verified because
|
||||
;; accepting an invitation link serves as verification.
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
::quotes/team-id team-id})
|
||||
|
||||
;; Insert the invited member to the team
|
||||
(db/insert! conn :team-profile-rel params {:on-conflict-do-nothing true})
|
||||
(db/insert! conn :team-profile-rel params {::db/on-conflict-do-nothing? true})
|
||||
|
||||
;; If profile is not yet verified, mark it as verified because
|
||||
;; accepting an invitation link serves as verification.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue