add item match permission

This commit is contained in:
j3d1 2024-01-07 19:53:25 +01:00
parent 0438eb0b6a
commit 6abf3af6c0
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,17 @@
# Generated by Django 4.2.7 on 2024-01-07 18:46
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('inventory', '0002_container_deleted_at_container_is_deleted_and_more'),
]
operations = [
migrations.AlterModelOptions(
name='item',
options={'permissions': [('match_item', 'Can match item')]},
),
]

View file

@ -29,7 +29,9 @@ class Item(SoftDeleteModel):
class Meta: class Meta:
unique_together = (('uid', 'event'),) unique_together = (('uid', 'event'),)
permissions = [
('match_item', 'Can match item')
]
class Container(SoftDeleteModel): class Container(SoftDeleteModel):
cid = models.AutoField(primary_key=True) cid = models.AutoField(primary_key=True)