mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'bug/pretzel-fresh-install' into 'dev'
Fix Logic issues on Fresh Install Detect See merge request crafty-controller/crafty-4!425
This commit is contained in:
commit
6a94417a63
@ -5,6 +5,7 @@ TBD
|
||||
### Bug fixes
|
||||
- Fix reaction tasks not firing ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/423))
|
||||
- QOL task delay offset not following over on task edit ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/423))
|
||||
- Fix Fresh Install Detection Logic issues ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/425))
|
||||
### Tweaks
|
||||
- Session Handling | Logout on browser close ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/424))
|
||||
### Lang
|
||||
|
@ -107,6 +107,12 @@ class HelperUsers:
|
||||
usernames.append(user.username)
|
||||
return usernames
|
||||
|
||||
@staticmethod
|
||||
def get_user_total():
|
||||
count = Users.select().where(Users.username != "system").count()
|
||||
print(count)
|
||||
return count
|
||||
|
||||
@staticmethod
|
||||
def get_all_user_ids() -> t.List[int]:
|
||||
return [
|
||||
|
@ -30,9 +30,8 @@ class DatabaseBuilder:
|
||||
|
||||
def is_fresh_install(self):
|
||||
try:
|
||||
user = self.users_helper.get_by_id(1)
|
||||
if user:
|
||||
return False
|
||||
num_user = self.users_helper.get_user_total()
|
||||
return num_user <= 0
|
||||
except:
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user