MCPcopy
hub / github.com/uselotus/lotus / provision_currencies

Method provision_currencies

backend/metering_billing/models.py:391–403  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

389 self.save()
390
391 def provision_currencies(self):
392 if SUPPORTED_CURRENCIES_VERSION != self.currencies_provisioned:
393 for name, code, symbol in SUPPORTED_CURRENCIES:
394 PricingUnit.objects.get_or_create(
395 organization=self, code=code, name=name, symbol=symbol, custom=False
396 )
397 PricingUnit.objects.filter(
398 ~Q(code__in=[code for _, code, _ in SUPPORTED_CURRENCIES]),
399 custom=False,
400 organization=self,
401 ).delete()
402 self.currencies_provisioned = SUPPORTED_CURRENCIES_VERSION
403 self.save()
404
405
406class WebhookEndpointManager(models.Manager):

Callers 2

saveMethod · 0.95
handleMethod · 0.80

Calls 2

saveMethod · 0.95
deleteMethod · 0.45

Tested by

no test coverage detected