Skip to content

Commit

Permalink
Fix required_data not running if data exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Sep 16, 2024
1 parent ce67911 commit 132e494
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/db/seed/required_data.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class Db::Seed::RequiredData < LuckyTask::Task
summary "Add database records required for the app to work"

def call
SignUpUser.create!(email: "[email protected]", password: "temp1234", password_confirmation: "temp1234")
unless UserQuery.new.email("[email protected]").first?
SignUpUser.create!(email: "[email protected]", password: "temp1234", password_confirmation: "temp1234")
end
# SaveProvince.create! &.name("北京市").code("110000")
# SaveCity.create! &.name("北京市").code("110100")
# Using a Avram::Factory:
Expand Down

0 comments on commit 132e494

Please sign in to comment.