deleted obsolete field type for sysproperties
This commit is contained in:
parent
9000826d68
commit
23b253cb89
|
@ -21,7 +21,7 @@ from django.views.generic.edit import (
|
||||||
from utils.save_snapshots import move_json, save_in_disk
|
from utils.save_snapshots import move_json, save_in_disk
|
||||||
from django.views.generic.edit import View
|
from django.views.generic.edit import View
|
||||||
from dashboard.mixins import DashboardView
|
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_details import ParseSnapshot
|
||||||
from evidence.parse import Build
|
from evidence.parse import Build
|
||||||
from device.models import Device
|
from device.models import Device
|
||||||
|
@ -117,7 +117,6 @@ class NewSnapshotView(ApiMixing):
|
||||||
|
|
||||||
property = SystemProperty.objects.filter(
|
property = SystemProperty.objects.filter(
|
||||||
uuid=ev_uuid,
|
uuid=ev_uuid,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
# TODO this is hardcoded, it should select the user preferred algorithm
|
# TODO this is hardcoded, it should select the user preferred algorithm
|
||||||
key="hidalgo1",
|
key="hidalgo1",
|
||||||
owner=self.tk.owner.institution
|
owner=self.tk.owner.institution
|
||||||
|
@ -285,7 +284,6 @@ class AddPropertyView(ApiMixing):
|
||||||
self.property = SystemProperty.objects.filter(
|
self.property = SystemProperty.objects.filter(
|
||||||
owner=institution,
|
owner=institution,
|
||||||
value=self.pk,
|
value=self.pk,
|
||||||
type=Property.Type.SYSTEM
|
|
||||||
).first()
|
).first()
|
||||||
|
|
||||||
if not self.property:
|
if not self.property:
|
||||||
|
|
|
@ -8,7 +8,7 @@ from utils.device import create_property, create_doc, create_index
|
||||||
from utils.forms import MultipleFileField
|
from utils.forms import MultipleFileField
|
||||||
from device.models import Device
|
from device.models import Device
|
||||||
from evidence.parse import Build
|
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
|
from utils.save_snapshots import move_json, save_in_disk
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ class UserTagForm(forms.Form):
|
||||||
self.user = kwargs.pop('user')
|
self.user = kwargs.pop('user')
|
||||||
instance = SystemProperty.objects.filter(
|
instance = SystemProperty.objects.filter(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
key='CUSTOM_ID',
|
key='CUSTOM_ID',
|
||||||
owner=self.user.institution
|
owner=self.user.institution
|
||||||
).first()
|
).first()
|
||||||
|
@ -91,7 +90,6 @@ class UserTagForm(forms.Form):
|
||||||
self.tag = data
|
self.tag = data
|
||||||
self.instance = SystemProperty.objects.filter(
|
self.instance = SystemProperty.objects.filter(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
key='CUSTOM_ID',
|
key='CUSTOM_ID',
|
||||||
owner=self.user.institution
|
owner=self.user.institution
|
||||||
).first()
|
).first()
|
||||||
|
@ -111,7 +109,6 @@ class UserTagForm(forms.Form):
|
||||||
|
|
||||||
SystemProperty.objects.create(
|
SystemProperty.objects.create(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
key='CUSTOM_ID',
|
key='CUSTOM_ID',
|
||||||
value=self.tag,
|
value=self.tag,
|
||||||
owner=self.user.institution,
|
owner=self.user.institution,
|
||||||
|
|
|
@ -7,7 +7,7 @@ from evidence import old_parse
|
||||||
from evidence import normal_parse
|
from evidence import normal_parse
|
||||||
from evidence.parse_details import ParseSnapshot
|
from evidence.parse_details import ParseSnapshot
|
||||||
|
|
||||||
from evidence.models import SystemProperty, Property
|
from evidence.models import SystemProperty
|
||||||
from evidence.xapian import index
|
from evidence.xapian import index
|
||||||
from evidence.normal_parse_details import get_inxi_key, get_inxi
|
from evidence.normal_parse_details import get_inxi_key, get_inxi
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
@ -203,7 +203,6 @@ class Build2:
|
||||||
property = SystemProperty.objects.filter(
|
property = SystemProperty.objects.filter(
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
owner=self.user.institution,
|
owner=self.user.institution,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if property:
|
if property:
|
||||||
|
@ -216,7 +215,6 @@ class Build2:
|
||||||
uuid=self.uuid,
|
uuid=self.uuid,
|
||||||
owner=self.user.institution,
|
owner=self.user.institution,
|
||||||
user=self.user,
|
user=self.user,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
key=k,
|
key=k,
|
||||||
value=v
|
value=v
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import logging
|
||||||
|
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from evidence.xapian import index
|
from evidence.xapian import index
|
||||||
from evidence.models import SystemProperty, Property
|
from evidence.models import SystemProperty
|
||||||
from device.models import Device
|
from device.models import Device
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,6 @@ def create_property(doc, user, commit=False):
|
||||||
'uuid': doc['uuid'],
|
'uuid': doc['uuid'],
|
||||||
'owner': user.institution,
|
'owner': user.institution,
|
||||||
'user': user,
|
'user': user,
|
||||||
'type': Property.Type.SYSTEM,
|
|
||||||
'key': 'CUSTOMER_ID',
|
'key': 'CUSTOMER_ID',
|
||||||
'value': doc['CUSTOMER_ID'],
|
'value': doc['CUSTOMER_ID'],
|
||||||
}
|
}
|
||||||
|
@ -84,7 +83,6 @@ def create_property(doc, user, commit=False):
|
||||||
property = SystemProperty.objects.filter(
|
property = SystemProperty.objects.filter(
|
||||||
uuid=doc["uuid"],
|
uuid=doc["uuid"],
|
||||||
owner=user.institution,
|
owner=user.institution,
|
||||||
type=Property.Type.SYSTEM,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if property:
|
if property:
|
||||||
|
|
Loading…
Reference in a new issue