0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 12:28:54 -05:00

Minor adaptations for tests of profile creation function.

This commit is contained in:
Andrey Antukh 2021-01-31 11:49:33 +01:00 committed by Alonso Torres
parent 2c05a82204
commit 5751ac6b4e

View file

@ -160,10 +160,12 @@
(defn- create-profile
"Create the profile entry on the database with limited input
filling all the other fields with defaults."
[conn {:keys [id fullname email password demo? props] :as params}]
[conn {:keys [id fullname email password demo? props is-active]
:or {is-active false}
:as params}]
(let [id (or id (uuid/next))
demo? (if (boolean? demo?) demo? false)
active? (if demo? true false)
active? (if demo? true is-active)
props (db/tjson (or props {}))
password (derive-password password)]
(-> (db/insert! conn :profile