user creation fix

pull/5/head
Mustafa Yontar 4 years ago
parent 4f3e40a3d2
commit a864c83adb
  1. 7
      models/Union.py
  2. 2
      restapi

@ -1,3 +1,5 @@
from datetime import datetime
from mongoengine import *
from werkzeug.security import generate_password_hash
from string import ascii_letters, digits
@ -43,6 +45,11 @@ class Union(Document):
group.save()
user = User()
user.gov_id = 'root'
user.name = "Root"
user.last_name = "Root"
user.telephone = "+900000000000"
user.gender = 'Agender'
user.date_of_birth = "2019-09-09"
user.username = "{}@root".format(self.legal_registration_number)
user.user_group = group
user.union = self

@ -1 +1 @@
Subproject commit 70be57ef3681f723271cc05edcbc055417a578d8
Subproject commit 040adf8aed61d4bd395e2ce293ecc648273e87f5
Loading…
Cancel
Save