fix - remove purchase_policy
This commit is contained in:
@@ -262,15 +262,15 @@ class OrganizationSerializer(serializers.ModelSerializer):
|
|||||||
'field_of_activity',
|
'field_of_activity',
|
||||||
'free_visibility_by_scope',
|
'free_visibility_by_scope',
|
||||||
'service_area', # noqa
|
'service_area', # noqa
|
||||||
'purchase_policy'
|
# 'purchase_policy'
|
||||||
]
|
]
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
'service_area': { # noqa
|
'service_area': { # noqa
|
||||||
'required': False
|
'required': False
|
||||||
},
|
},
|
||||||
'purchase_policy': {
|
# 'purchase_policy': {
|
||||||
'purchase_policy': False
|
# 'purchase_policy': False
|
||||||
}
|
# }
|
||||||
}
|
}
|
||||||
|
|
||||||
def validate(self, attrs):
|
def validate(self, attrs):
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 5.0 on 2025-12-30 08:51
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('authentication', '0051_organization_purchase_policy'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='organization',
|
||||||
|
name='purchase_policy',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -147,16 +147,17 @@ class Organization(BaseModel):
|
|||||||
has_pos = models.BooleanField(default=False)
|
has_pos = models.BooleanField(default=False)
|
||||||
additional_data = models.JSONField(default=dict)
|
additional_data = models.JSONField(default=dict)
|
||||||
service_area = models.ManyToManyField(City, related_name='service_area')
|
service_area = models.ManyToManyField(City, related_name='service_area')
|
||||||
PURCHASE_POLICIES = (
|
|
||||||
('INTERNAL_ONLY', 'Internal Only'),
|
# PURCHASE_POLICIES = (
|
||||||
('CROSS_COOP', 'Cross Cooperative Allowed'),
|
# ('INTERNAL_ONLY', 'Internal Only'),
|
||||||
)
|
# ('CROSS_COOP', 'Cross Cooperative Allowed'),
|
||||||
purchase_policy = models.CharField(
|
# )
|
||||||
max_length=20,
|
# purchase_policy = models.CharField(
|
||||||
choices=PURCHASE_POLICIES,
|
# max_length=20,
|
||||||
default='INTERNAL_ONLY',
|
# choices=PURCHASE_POLICIES,
|
||||||
help_text='defines where ranchers can purchase from'
|
# default='INTERNAL_ONLY',
|
||||||
)
|
# help_text='defines where ranchers can purchase from'
|
||||||
|
# )
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'{self.name}-{self.type}'
|
return f'{self.name}-{self.type}'
|
||||||
|
|||||||
Reference in New Issue
Block a user