Updates so the ASN will start at 1

This commit is contained in:
Trenton H 2024-01-16 09:00:35 -08:00
parent 11beaa1f2f
commit 8ee54512f8

View File

@ -760,8 +760,9 @@ class UnifiedSearchViewSet(DocumentViewSet):
max_asn = Document.objects.aggregate(Max("archive_serial_number")).get(
"archive_serial_number__max",
)
max_asn = 0 if max_asn is None else max_asn + 1
return Response(max_asn)
if max_asn is None:
max_asn = 0
return Response(max_asn + 1)
class LogViewSet(ViewSet):