mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-10 10:57:52 +00:00
Enforce at least one base currency to be selected
This commit is contained in:
1 parent
654fbc3847
commit
f24496c5a2
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user