##// END OF EJS Templates
users: ensure get_first_superadmin actually gets the 1st created super-admin.
marcink -
r3085:dd0ed7cf default
parent child Browse files
Show More
@@ -943,7 +943,11 b' class User(Base, BaseModel):'
943 943
944 944 @classmethod
945 945 def get_first_super_admin(cls):
946 user = User.query().filter(User.admin == true()).first()
946 user = User.query()\
947 .filter(User.admin == true()) \
948 .order_by(User.user_id.asc()) \
949 .first()
950
947 951 if user is None:
948 952 raise Exception('FATAL: Missing administrative account!')
949 953 return user
General Comments 0
You need to be logged in to leave comments. Login now