Add source_site_id to ActiveSite model and implement unique constraint. Update serializers and views for site registration and claiming. Enhance tests for site registration and claiming functionality.
This commit is contained in:
1 parent
521f36d22d
commit
61f954a3bd
12 files changed
+684
-172
No files matched your search
@@ -0,0 +1,24 @@
|
||||
# Generated manually: ActiveSite.source_site_id from city Site.site_id
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("sync", "0005_rename_registered_by_to_managed_by"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="activesite",
|
||||
name="source_site_id",
|
||||
field=models.SlugField(
|
||||
blank=True,
|
||||
db_index=True,
|
||||
default="",
|
||||
help_text="Farm-location Site.site_id (slug) from the registering dashboard",
|
||||
max_length=64,
|
||||
),
|
||||
),
|
||||
]
|
||||
Reference in new issue
Block a user