Skip to content

Commit

Permalink
sync-db: manually set entries as OSS if they have a license or a repo…
Browse files Browse the repository at this point in the history
…sitory
  • Loading branch information
avivace committed Jun 6, 2024
1 parent 156485e commit f8d6da0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/sync_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ def run():
except Exception:
parsed_date = None

# Manually flag an entry as Open Source if it has an explicit license
# set or if it has a valid git repository
if "Open Source" not in data["tags"]:
if "repository" in data:
if data["repository"] != "":
data["tags"].append("Open Source")
if "gameLicense" in data:
data["tags"].append("Open Source")

# Returns an (entry, bool) tuple. Here we don't need the object that was
# either updated or created, we only want to know if it was created or not
_, created = Entry.objects.update_or_create(
Expand Down

0 comments on commit f8d6da0

Please sign in to comment.