Skip to content

Commit

Permalink
🗃️ [#317] Added unique true to the _name field, and added migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ErhanCitil committed May 19, 2023
1 parent 45ea40c commit 94c3b75
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/objects/core/migrations/0028_auto_20230519_1201.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.28 on 2023-05-19 10:01

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0027_auto_20211203_1209'),
]

operations = [
migrations.AlterField(
model_name='objecttype',
name='_name',
field=models.CharField(help_text='Cached name of the objecttype retrieved from the Objecttype API', max_length=100, unique=True),
),
]
2 changes: 1 addition & 1 deletion src/objects/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ObjectType(models.Model):
)
_name = models.CharField(
max_length=100,
help_text=_("Cached name of the objecttype retrieved from the Objecttype API"),
help_text=_("Cached name of the objecttype retrieved from the Objecttype API"), unique=True
)

objects = ObjectTypeQuerySet.as_manager()
Expand Down

0 comments on commit 94c3b75

Please sign in to comment.