mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Enforce at least one base currency to be selected
This commit is contained in:
parent
654fbc3847
commit
f24496c5a2
@ -69,7 +69,7 @@ class Currency(models.Model):
|
||||
cur.save()
|
||||
|
||||
# If there are no currencies set as the base currency, set this as base
|
||||
if not Currency.objects.filter(base=True).exists():
|
||||
if not Currency.objects.exclude(pk=self.pk).filter(base=True).exists():
|
||||
self.base = True
|
||||
|
||||
# If this is the base currency, ensure value is set to unity
|
||||
|
Loading…
Reference in New Issue
Block a user