add org type to device login response - temporary livestock rancher statistic
This commit is contained in:
@@ -10,6 +10,7 @@ from rest_framework import serializers
|
||||
from apps.herd.models import Herd, Rancher
|
||||
from django.db.transaction import atomic
|
||||
|
||||
|
||||
class HerdSerializer(serializers.ModelSerializer):
|
||||
""" Herd Serializer """
|
||||
|
||||
@@ -46,7 +47,6 @@ class RancherSerializer(serializers.ModelSerializer):
|
||||
rancher = Rancher.objects.create(**validated_data) # create rancher
|
||||
if 'livestock' in data.keys():
|
||||
live_stocks = data['livestock']
|
||||
print(live_stocks)
|
||||
livestock_types = {stock.id: stock for stock in livestock_models.LiveStockType.objects.all()}
|
||||
|
||||
for stock in live_stocks:
|
||||
|
||||
Reference in New Issue
Block a user