Remove ServiceInstance soft-delete #174
2 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue