Skip to content

Commit

Permalink
Merge pull request #39 from lubomir/pop-script-skip
Browse files Browse the repository at this point in the history
Skip badges with series in populate script
  • Loading branch information
sayanchowdhury authored Sep 19, 2016
2 parents d5565ce + 6ae013e commit 5c78e0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tahrir_api/scripts/populateseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def main(argv=sys.argv):

with transaction.manager:
for badge in DBSession.query(Badge).all():
if badge.milestone:
# Skip badges that already are in some series.
continue
series_name, ordering = get_series_name(badge.name)
if series_name and ordering:
series = DBSession.query(Series).filter(Series.name == series_name).first()
Expand Down

0 comments on commit 5c78e0f

Please sign in to comment.