Skip to content

Commit f8d6da0

Browse files
committed
sync-db: manually set entries as OSS if they have a license or a repository
1 parent 156485e commit f8d6da0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/sync_db.py

+9
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@ def run():
127127
except Exception:
128128
parsed_date = None
129129

130+
# Manually flag an entry as Open Source if it has an explicit license
131+
# set or if it has a valid git repository
132+
if "Open Source" not in data["tags"]:
133+
if "repository" in data:
134+
if data["repository"] != "":
135+
data["tags"].append("Open Source")
136+
if "gameLicense" in data:
137+
data["tags"].append("Open Source")
138+
130139
# Returns an (entry, bool) tuple. Here we don't need the object that was
131140
# either updated or created, we only want to know if it was created or not
132141
_, created = Entry.objects.update_or_create(

0 commit comments

Comments
 (0)