fix - add purchase_policy to org

This commit is contained in:
2025-12-30 14:08:44 +03:30
parent 641461396a
commit 9a02ad4622
3 changed files with 32 additions and 14 deletions

View File

@@ -148,16 +148,16 @@ class Organization(BaseModel):
additional_data = models.JSONField(default=dict)
service_area = models.ManyToManyField(City, related_name='service_area')
# PURCHASE_POLICIES = (
# ('INTERNAL_ONLY', 'Internal Only'),
# ('CROSS_COOP', 'Cross Cooperative Allowed'),
# )
# purchase_policy = models.CharField(
# max_length=20,
# choices=PURCHASE_POLICIES,
# default='INTERNAL_ONLY',
# help_text='defines where ranchers can purchase from'
# )
PURCHASE_POLICIES = (
('INTERNAL_ONLY', 'Internal Only'),
('CROSS_COOP', 'Cross Cooperative Allowed'),
)
purchase_policy = models.CharField(
max_length=20,
choices=PURCHASE_POLICIES,
default='INTERNAL_ONLY',
help_text='defines where ranchers can purchase from'
)
def __str__(self):
return f'{self.name}-{self.type}'