Remove ServiceInstance soft-delete #174

Merged
tobru merged 3 commits from 167-drop-soft-delete into main 2025-09-05 13:37:25 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 6545f32e39 - Show all commits

View file

@ -6,6 +6,7 @@ import re
import kubernetes import kubernetes
import rules import rules
import urlman import urlman
from auditlog.registry import auditlog
from django.conf import settings from django.conf import settings
from django.core.cache import cache from django.core.cache import cache
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
@ -921,3 +922,6 @@ class ServiceInstance(ServalaModelMixin, models.Model):
return {"error": str(e)} return {"error": str(e)}
except Exception as e: except Exception as e:
return {"error": str(e)} return {"error": str(e)}
auditlog.register(ServiceInstance, exclude_fields=["updated_at"], serialize_data=True)

View file

@ -157,6 +157,7 @@ INSTALLED_APPS = [
"allauth.account", "allauth.account",
"allauth.socialaccount", "allauth.socialaccount",
"allauth.socialaccount.providers.openid_connect", "allauth.socialaccount.providers.openid_connect",
"auditlog",
"servala.core", "servala.core",
] ]
@ -170,6 +171,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware",
"allauth.account.middleware.AccountMiddleware", "allauth.account.middleware.AccountMiddleware",
"django.contrib.auth.middleware.LoginRequiredMiddleware", "django.contrib.auth.middleware.LoginRequiredMiddleware",
"auditlog.middleware.AuditlogMiddleware",
"servala.core.middleware.OrganizationMiddleware", "servala.core.middleware.OrganizationMiddleware",
] ]
LOGIN_URL = "account_login" LOGIN_URL = "account_login"