add rancher dhi stat

This commit is contained in:
2025-09-20 12:52:49 +03:30
parent e8f4c77e9f
commit 8cfe3888f1
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0 on 2025-09-20 09:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('herd', '0017_rancher_ignore_purchase_limit'),
]
operations = [
migrations.AddField(
model_name='rancher',
name='dhi_state',
field=models.BooleanField(default=False),
),
]

View File

@@ -22,7 +22,7 @@ def get_rancher_statistics(rancher: Rancher = None) -> typing.Any:
camel_count=Count('id', filter=Q(type__name='شتر')),
horse_count=Count('id', filter=Q(type__name='بز')),
)
stats.update({'dhi_stat': rancher.dhi_state}) # add rancher dhi stat to dict result
return stats