add - script for duplicate ranchers / set blank to union fields in rancher

This commit is contained in:
2025-11-12 15:31:27 +03:30
parent 5a42c69901
commit 94192871e1
3 changed files with 193 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
from django.db import models
from apps.authentication import models as auth_models
from apps.core.models import BaseModel
from django.db import models
class Herd(BaseModel):
owner = models.ForeignKey(
@@ -83,8 +83,8 @@ class Herd(BaseModel):
class Rancher(BaseModel):
ranching_farm = models.CharField(max_length=150, null=True)
union_name = models.CharField(max_length=50, null=True)
union_code = models.CharField(max_length=50, null=True)
union_name = models.CharField(max_length=50, null=True, blank=True)
union_code = models.CharField(max_length=50, null=True, blank=True)
activity_types = (
("I", "Industrial"),
("V", "Village"),