deleted obsolete field type for sysproperties
This commit is contained in:
parent
443c37b1e2
commit
b1460d39af
|
@ -21,7 +21,7 @@ from django.views.generic.edit import (
|
|||
from utils.save_snapshots import move_json, save_in_disk
|
||||
from django.views.generic.edit import View
|
||||
from dashboard.mixins import DashboardView
|
||||
from evidence.models import SystemProperty, UserProperty, Property
|
||||
from evidence.models import SystemProperty, UserProperty
|
||||
from evidence.parse_details import ParseSnapshot
|
||||
from evidence.parse import Build
|
||||
from device.models import Device
|
||||
|
@ -113,7 +113,6 @@ class NewSnapshotView(ApiMixing):
|
|||
|
||||
property = SystemProperty.objects.filter(
|
||||
uuid=data['uuid'],
|
||||
type=Property.Type.SYSTEM,
|
||||
# TODO this is hardcoded, it should select the user preferred algorithm
|
||||
key="hidalgo1",
|
||||
owner=self.tk.owner.institution
|
||||
|
@ -281,7 +280,6 @@ class AddPropertyView(ApiMixing):
|
|||
self.property = SystemProperty.objects.filter(
|
||||
owner=institution,
|
||||
value=self.pk,
|
||||
type=Property.Type.SYSTEM
|
||||
).first()
|
||||
|
||||
if not self.property:
|
||||
|
|
|
@ -8,7 +8,7 @@ from utils.device import create_property, create_doc, create_index
|
|||
from utils.forms import MultipleFileField
|
||||
from device.models import Device
|
||||
from evidence.parse import Build
|
||||
from evidence.models import SystemProperty, Property
|
||||
from evidence.models import SystemProperty
|
||||
from utils.save_snapshots import move_json, save_in_disk
|
||||
|
||||
|
||||
|
@ -70,7 +70,6 @@ class UserTagForm(forms.Form):
|
|||
self.user = kwargs.pop('user')
|
||||
instance = SystemProperty.objects.filter(
|
||||
uuid=self.uuid,
|
||||
type=Property.Type.SYSTEM,
|
||||
key='CUSTOM_ID',
|
||||
owner=self.user.institution
|
||||
).first()
|
||||
|
@ -88,7 +87,6 @@ class UserTagForm(forms.Form):
|
|||
self.tag = data
|
||||
self.instance = SystemProperty.objects.filter(
|
||||
uuid=self.uuid,
|
||||
type=Property.Type.SYSTEM,
|
||||
key='CUSTOM_ID',
|
||||
owner=self.user.institution
|
||||
).first()
|
||||
|
@ -108,7 +106,6 @@ class UserTagForm(forms.Form):
|
|||
|
||||
SystemProperty.objects.create(
|
||||
uuid=self.uuid,
|
||||
type=Property.Type.SYSTEM,
|
||||
key='CUSTOM_ID',
|
||||
value=self.tag,
|
||||
owner=self.user.institution,
|
||||
|
|
|
@ -6,7 +6,7 @@ from dmidecode import DMIParse
|
|||
from json_repair import repair_json
|
||||
from evidence.parse_details import get_lshw_child
|
||||
|
||||
from evidence.models import SystemProperty, Property
|
||||
from evidence.models import SystemProperty
|
||||
from evidence.xapian import index
|
||||
from utils.constants import CHASSIS_DH
|
||||
|
||||
|
@ -76,7 +76,6 @@ class Build:
|
|||
property = SystemProperty.objects.filter(
|
||||
uuid=self.uuid,
|
||||
owner=self.user.institution,
|
||||
type=Property.Type.SYSTEM,
|
||||
)
|
||||
|
||||
if property:
|
||||
|
@ -89,7 +88,6 @@ class Build:
|
|||
uuid=self.uuid,
|
||||
owner=self.user.institution,
|
||||
user=self.user,
|
||||
type=Property.Type.SYSTEM,
|
||||
key=k,
|
||||
value=v
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ import logging
|
|||
|
||||
from django.core.exceptions import ValidationError
|
||||
from evidence.xapian import index
|
||||
from evidence.models import SystemProperty, Property
|
||||
from evidence.models import SystemProperty
|
||||
from device.models import Device
|
||||
|
||||
|
||||
|
@ -76,7 +76,6 @@ def create_property(doc, user, commit=False):
|
|||
'uuid': doc['uuid'],
|
||||
'owner': user.institution,
|
||||
'user': user,
|
||||
'type': Property.Type.SYSTEM,
|
||||
'key': 'CUSTOMER_ID',
|
||||
'value': doc['CUSTOMER_ID'],
|
||||
}
|
||||
|
@ -84,7 +83,6 @@ def create_property(doc, user, commit=False):
|
|||
property = SystemProperty.objects.filter(
|
||||
uuid=doc["uuid"],
|
||||
owner=user.institution,
|
||||
type=Property.Type.SYSTEM,
|
||||
)
|
||||
|
||||
if property:
|
||||
|
|
Loading…
Reference in a new issue