From 564b016a8d06db940b1936fe15ff529ad2c6fe11 Mon Sep 17 00:00:00 2001 From: Mano Date: Thu, 7 Oct 2021 10:54:16 +0100 Subject: [PATCH] Add some much-needed comments --- api/licences/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/licences/models.py b/api/licences/models.py index 59595013c..d92ac52a3 100644 --- a/api/licences/models.py +++ b/api/licences/models.py @@ -22,6 +22,9 @@ class HMRCIntegrationUsageData(TimestampableModel): class Licence(TimestampableModel): + """ + A licence issued to an exporter application + """ id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) reference_code = models.CharField(max_length=30, unique=True, editable=False) case = models.ForeignKey(Case, on_delete=models.CASCADE, null=False, blank=False, related_name="licences") @@ -79,6 +82,7 @@ def save(self, *args, **kwargs): send_status_change_to_hmrc = kwargs.pop("send_status_change_to_hmrc", False) super(Licence, self).save(*args, **kwargs) + # Immediately notify HMRC if needed if LITE_HMRC_INTEGRATION_ENABLED and send_status_change_to_hmrc and self.status != LicenceStatus.DRAFT: self.send_to_hmrc_integration()