Skip to content

Commit

Permalink
import-scrapy.py: Update entries when server info is different
Browse files Browse the repository at this point in the history
This prepares the import script to re-process all entries and fix the
server info after the pkg-status IPv4 proxy was introduced.
  • Loading branch information
dbaio committed Aug 25, 2023
1 parent 885012b commit 45ab868
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/import-scrapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,16 @@ def read_scrapy_json():
defaults={'flavor': row['flavor']},)

if not created:
changed_fields: int = 0
if fallout.flavor != row['flavor']:
fallout.flavor = row['flavor']
changed_fields += 1

if fallout.server != i_server:
fallout.server = i_server
changed_fields += 1

if changed_fields > 0:
fallout.save()


Expand Down

0 comments on commit 45ab868

Please sign in to comment.