Skip to content

Commit

Permalink
move inside if block
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 29, 2024
1 parent 18b1afe commit 8d543dc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions api/tacticalrmm/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,13 @@ def save(self, *args, **kwargs) -> None:

old_settings = type(self).objects.get(pk=self.pk) if self.pk else None

print(old_settings.__dict__)
# fail safe to not lock out user logons
if not old_settings.sso_enabled and old_settings.block_local_user_logon:
self.block_local_user_logon = False
print("I'm Here!")

super().save(*args, **kwargs)

if old_settings:
# fail safe to not lock out user logons
if not old_settings.sso_enabled and old_settings.block_local_user_logon:
self.block_local_user_logon = False

if (
old_settings.alert_template != self.alert_template
or old_settings.server_policy != self.server_policy
Expand Down

0 comments on commit 8d543dc

Please sign in to comment.