add rancher dhi stat
This commit is contained in:
18
apps/herd/migrations/0018_rancher_dhi_state.py
Normal file
18
apps/herd/migrations/0018_rancher_dhi_state.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -22,7 +22,7 @@ def get_rancher_statistics(rancher: Rancher = None) -> typing.Any:
|
|||||||
camel_count=Count('id', filter=Q(type__name='شتر')),
|
camel_count=Count('id', filter=Q(type__name='شتر')),
|
||||||
horse_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
|
return stats
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user