This commit is contained in:
Matthias
2022-03-30 01:42:00 +02:00
parent 1d24f3586d
commit c278a5397f

View File

@ -41,6 +41,7 @@ class CompanyAdmin(ImportExportModelAdmin):
exclude = ('is_deleted',)
def has_delete_permission(self, request, obj=None):
"""Magic objects are not allowd to be deleted"""
if obj and obj.is_deleted:
return False
return True