add is_repeatable & remove unique of org national_unique_id
This commit is contained in:
@@ -204,6 +204,7 @@ class OrganizationTypeSerializer(serializers.ModelSerializer):
|
||||
'key',
|
||||
'name',
|
||||
'org_type_field',
|
||||
'is_repeatable'
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0 on 2025-10-29 05:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0040_organizationtype_org_type_field'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='organizationtype',
|
||||
name='is_repeatable',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0 on 2025-10-29 05:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0041_organizationtype_is_repeatable'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='organization',
|
||||
name='national_unique_id',
|
||||
field=models.CharField(default='0', max_length=30),
|
||||
),
|
||||
]
|
||||
@@ -90,6 +90,7 @@ class OrganizationType(BaseModel):
|
||||
('CO', 'country'),
|
||||
('PR', 'province'),
|
||||
], max_length=25, null=True)
|
||||
is_repeatable = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.key}-{self.name}'
|
||||
@@ -108,7 +109,7 @@ class Organization(BaseModel):
|
||||
related_name="organization_type",
|
||||
null=True
|
||||
)
|
||||
national_unique_id = models.CharField(max_length=30, default="0", unique=True)
|
||||
national_unique_id = models.CharField(max_length=30, default="0")
|
||||
activity_fields = (
|
||||
('CO', 'Country'),
|
||||
('PR', 'Province'),
|
||||
|
||||
Reference in New Issue
Block a user