Skip to content

Commit

Permalink
Final Boolean fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Nov 15, 2023
1 parent 7e6b330 commit 079fe18
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,9 +1924,14 @@ def db_update_single_series(
if searched:
to_update[self.model_file.Searched] = searched

if self.model_file.get_or_none(self.model_file.EntryId == EntryId).Upgrade:
upgrade = True
to_update[self.model_file.Upgrade] = upgrade
try:
if self.model_file.get_or_none(
self.model_file.EntryId == EntryId
).Upgrade:
upgrade = True
to_update[self.model_file.Upgrade] = upgrade
except AttributeError:
upgrade = False

if request:
to_update[self.model_file.IsRequest] = request
Expand Down Expand Up @@ -1993,11 +1998,14 @@ def db_update_single_series(
if searched:
to_update[self.series_file_model.Searched] = searched

if self.series_file_model.get_or_none(
self.series_file_model.EntryId == EntryId
).Upgrade:
upgrade = True
to_update[self.series_file_model.Upgrade] = upgrade
try:
if self.series_file_model.get_or_none(
self.series_file_model.EntryId == EntryId
).Upgrade:
upgrade = True
to_update[self.series_file_model.Upgrade] = upgrade
except AttributeError:
upgrade = False

db_commands = self.series_file_model.insert(
EntryId=EntryId,
Expand Down Expand Up @@ -2054,9 +2062,12 @@ def db_update_single_series(
if searched:
to_update[self.model_file.Searched] = searched

if self.model_file.get_or_none(self.model_file.EntryId == entryId).Upgrade:
upgrade = True
to_update[self.model_file.Upgrade] = upgrade
try:
if self.model_file.get_or_none(self.model_file.EntryId == EntryId).Upgrade:
upgrade = True
to_update[self.model_file.Upgrade] = upgrade
except AttributeError:
upgrade = False

if request:
to_update[self.model_file.IsRequest] = request
Expand Down

0 comments on commit 079fe18

Please sign in to comment.