File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -210,15 +210,8 @@ class CityView(mixins.ListModelMixin, viewsets.GenericViewSet):
210
210
class NodesView (viewsets .ViewSet ):
211
211
def list (self , request ):
212
212
nodes = []
213
-
214
- public_threshold = timezone .now () - relativedelta (months = 3 )
215
- lastactive_queryset = LastActiveNodes .objects .filter (last_data_received_at__gte = public_threshold )
216
- if self .request .user .is_authenticated ():
217
- if self .request .user .groups .filter (name = "show_me_everything" ).exists ():
218
- lastactive_queryset = LastActiveNodes .objects .all ()
219
-
220
213
# Loop through the last active nodes
221
- for last_active in lastactive_queryset .iterator ():
214
+ for last_active in LastActiveNodes . objects .iterator ():
222
215
# Get the current node
223
216
node = Node .objects .filter (
224
217
Q (id = last_active .node .id ), ~ Q (sensors = None )
You can’t perform that action at this time.
0 commit comments