add is_repeatable & remove unique of org national_unique_id
This commit is contained in:
@@ -204,6 +204,7 @@ class OrganizationTypeSerializer(serializers.ModelSerializer):
|
|||||||
'key',
|
'key',
|
||||||
'name',
|
'name',
|
||||||
'org_type_field',
|
'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'),
|
('CO', 'country'),
|
||||||
('PR', 'province'),
|
('PR', 'province'),
|
||||||
], max_length=25, null=True)
|
], max_length=25, null=True)
|
||||||
|
is_repeatable = models.BooleanField(default=False)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'{self.key}-{self.name}'
|
return f'{self.key}-{self.name}'
|
||||||
@@ -108,7 +109,7 @@ class Organization(BaseModel):
|
|||||||
related_name="organization_type",
|
related_name="organization_type",
|
||||||
null=True
|
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 = (
|
activity_fields = (
|
||||||
('CO', 'Country'),
|
('CO', 'Country'),
|
||||||
('PR', 'Province'),
|
('PR', 'Province'),
|
||||||
|
|||||||
Reference in New Issue
Block a user