2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-31 05:05:42 +00:00

make operators simpler

This commit is contained in:
Matthias
2022-05-15 17:52:23 +02:00
parent af8bddf690
commit 77aeecf23a
12 changed files with 25 additions and 25 deletions

View File

@@ -494,7 +494,7 @@ class SupplierPart(models.Model):
# Ensure that the linked manufacturer_part points to the same part!
if self.manufacturer_part and self.part:
if not self.manufacturer_part.part == self.part:
if self.manufacturer_part.part != self.part:
raise ValidationError({
'manufacturer_part': _("Linked manufacturer part must reference the same base part"),
})

View File

@@ -162,7 +162,7 @@ class CompanyImageDownloadFromURL(AjaxUpdateView):
self.response = response
# Check for valid response code
if not response.status_code == 200:
if response.status_code != 200:
form.add_error('url', _('Invalid response: {code}').format(code=response.status_code))
return