Commit 83dbb677 authored by John Red Medrano's avatar John Red Medrano

added unique_together on department

parent 67155b22
# Generated by Django 2.2 on 2019-10-01 11:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('entities', '0006_auto_20191001_1024'),
]
operations = [
migrations.AlterModelOptions(
name='changerequestformheader',
options={},
),
migrations.AlterUniqueTogether(
name='department',
unique_together={('company', 'name')},
),
]
......@@ -130,6 +130,8 @@ class Department(AuditClass):
class Meta:
db_table = 'departments'
unique_together = ['company', 'name']
def __str__(self):
return f'{self.name}'
......@@ -706,7 +708,6 @@ class ChangeRequestFormHeader(BaseHeader):
class Meta:
db_table = 'change_request_form_headers'
ordering = ['-created']
def __str__(self):
return f'{self.form_code}'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment