Guest User

Untitled

a guest
Feb 20th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. def get_queryset(self):
  2. pk = self.kwargs['pk']
  3. not_restriction = Ejemplo.objects.filter(not_restriction=True, id=pk)
  4.  
  5. if not_restriction.count() == 1:
  6. return [Dispositivos(id='not_restriction', serie='not_restriction')]
  7. return Dispositivos.objects.filter(is_active=True, device__config_element__agent__registration_code=pk)
Add Comment
Please, Sign In to add comment