feat(device): Record inventory date and show as part of details

inventory date is added when an inventory is processed

!8 #2
This commit is contained in:
2024-05-20 20:46:44 +09:30
parent 6b5acc0d57
commit fb041f77eb
4 changed files with 43 additions and 7 deletions

View File

@ -226,13 +226,6 @@ class Collect(views.APIView):
device_software.save()
if not device_software.installed: # Only update install date if blank
device_software.installed = timezone.now()
device_software.save()
if device and operating_system and operating_system_version and device_operating_system:
# Remove software no longer installed
@ -241,6 +234,10 @@ class Collect(views.APIView):
software = software,
).delete()
device.inventorydate = timezone.now()
device.save()
status = Http.Status.OK