Skip to content
Snippets Groups Projects
Commit 40443e77 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

avoid trying to set the admin email to nil in data migration.

parent 78d1fd00
No related branches found
No related tags found
No related merge requests found
......@@ -85,4 +85,5 @@
;; Populate the initial value for the `:admin-email` setting for anyone who hasn't done it yet
(defmigration set-admin-email
(when-not (setting/get :admin-email)
(setting/set :admin-email (db/sel :one :field ['User :email] (k/where {:is_superuser true :is_active true})))))
(when-let [email (db/sel :one :field ['User :email] (k/where {:is_superuser true :is_active true}))]
(setting/set :admin-email email))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment