Enhancement: add ASN to consume rejection message

When not consuming a document since its ASN collides with an already existing one,
make the ASN part of the message to make it easier for the user to find out which
document causes the collision.
This commit is contained in:
Elias Probst
2024-03-28 23:47:04 +01:00
parent fbe7acc6b0
commit dec68d4fec

View File

@@ -368,7 +368,7 @@ class Consumer(LoggingMixin):
if Document.objects.filter(archive_serial_number=self.override_asn).exists():
self._fail(
ConsumerStatusShortMessage.ASN_ALREADY_EXISTS,
f"Not consuming {self.filename}: Given ASN already exists!",
f"Not consuming {self.filename}: Given ASN {self.override_asn} already exists!",
)
def run_pre_consume_script(self):