1
0
Fork 0

linting R0101

too-many-nested-blocks - pulled a break point out for utils.py/decode_data to get rid of a nested block

Signed-off-by: Corey Shields <cshields@gmail.com>
merge-requests/399/head
Corey Shields 2019-07-13 18:49:18 -04:00
parent 389194b076
commit 3ce647e374
2 changed files with 61 additions and 60 deletions

View File

@ -9,7 +9,6 @@ disable=
C0412,
E1101,
E0213,
R0101,
R0201,
R0401,
R0801,

View File

@ -188,7 +188,9 @@ def decode_data(norad, period=None):
otherwise attempt to decode everything
"""
sat = Satellite.objects.get(norad_cat_id=norad)
if sat.has_telemetry_decoders:
if not sat.has_telemetry_decoders:
return
now = datetime.utcnow()
if period:
time_period = now - timedelta(hours=4)