erase_server type now userproperty
This commit is contained in:
parent
23b253cb89
commit
9baae6293f
|
@ -186,9 +186,9 @@ class EraseServerForm(forms.Form):
|
||||||
self.pk = None
|
self.pk = None
|
||||||
self.uuid = kwargs.pop('uuid', None)
|
self.uuid = kwargs.pop('uuid', None)
|
||||||
self.user = kwargs.pop('user')
|
self.user = kwargs.pop('user')
|
||||||
instance = SystemProperty.objects.filter(
|
instance = UserProperty.objects.filter(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
type=SystemProperty.Type.ERASE_SERVER,
|
type=UserProperty.Type.ERASE_SERVER,
|
||||||
key='ERASE_SERVER',
|
key='ERASE_SERVER',
|
||||||
owner=self.user.institution
|
owner=self.user.institution
|
||||||
).first()
|
).first()
|
||||||
|
@ -201,9 +201,9 @@ class EraseServerForm(forms.Form):
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
self.erase_server = self.cleaned_data.get('erase_server', False)
|
self.erase_server = self.cleaned_data.get('erase_server', False)
|
||||||
self.instance = SystemProperty.objects.filter(
|
self.instance = UserProperty.objects.filter(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
type=Property.Type.ERASE_SERVER,
|
type=UserProperty.Type.ERASE_SERVER,
|
||||||
key='ERASE_SERVER',
|
key='ERASE_SERVER',
|
||||||
owner=self.user.institution
|
owner=self.user.institution
|
||||||
).first()
|
).first()
|
||||||
|
@ -222,9 +222,9 @@ class EraseServerForm(forms.Form):
|
||||||
if self.instance:
|
if self.instance:
|
||||||
return
|
return
|
||||||
|
|
||||||
SystemProperty.objects.create(
|
UserProperty.objects.create(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
type=Property.Type.ERASE_SERVER,
|
type=UserProperty.Type.ERASE_SERVER,
|
||||||
key='ERASE_SERVER',
|
key='ERASE_SERVER',
|
||||||
value=self.erase_server,
|
value=self.erase_server,
|
||||||
owner=self.user.institution,
|
owner=self.user.institution,
|
||||||
|
|
Loading…
Reference in a new issue