wushaodong %!s(int64=4) %!d(string=hai) anos
pai
achega
6fb7dc2285
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apps/account/views.py

+ 1 - 1
apps/account/views.py

@@ -192,7 +192,7 @@ class StoreTreeView(APIView):
                 'field':'agent',
                 'children': [],
             }
-            stores = Store.objects.filter(agent=agent, enable=True).values('id','name')
+            stores = Store.objects.filter(agent_id=agent['id'], enable=True).values('id','name')
             for store in stores:
                 manage_store = ManageStoreUser.objects.filter(manage_user_id=id, store=store).first()
                 checked = True and manage_store or False