device assignment bug-assignment information-bug of organizations list for assignment
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 5.0 on 2025-08-16 10:08
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0033_organization_en_name_alter_organization_name'),
|
||||
('pos_device', '0054_alter_deviceactivationcode_expires_at'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='posclient',
|
||||
name='organization',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='client', to='authentication.organization'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='deviceassignment',
|
||||
constraint=models.UniqueConstraint(fields=('client', 'device'), name='unique_assign_client_device', violation_error_code=403, violation_error_message='این کلاینت با همین دستگاه قبلا تخصیص داده شده است'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.0 on 2025-08-16 10:50
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pos_device', '0055_alter_posclient_organization_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveConstraint(
|
||||
model_name='deviceassignment',
|
||||
name='unique_assign_client_device',
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user