Updates so the ASN will start at 1
This commit is contained in:
parent
11beaa1f2f
commit
8ee54512f8
@ -760,8 +760,9 @@ class UnifiedSearchViewSet(DocumentViewSet):
|
|||||||
max_asn = Document.objects.aggregate(Max("archive_serial_number")).get(
|
max_asn = Document.objects.aggregate(Max("archive_serial_number")).get(
|
||||||
"archive_serial_number__max",
|
"archive_serial_number__max",
|
||||||
)
|
)
|
||||||
max_asn = 0 if max_asn is None else max_asn + 1
|
if max_asn is None:
|
||||||
return Response(max_asn)
|
max_asn = 0
|
||||||
|
return Response(max_asn + 1)
|
||||||
|
|
||||||
|
|
||||||
class LogViewSet(ViewSet):
|
class LogViewSet(ViewSet):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user