mirror of
https://github.com/Findus23/cr-search.git
synced 2024-09-11 06:03:45 +02:00
14 lines
434 B
Python
14 lines
434 B
Python
from data import colors
|
|
from models import Person, Series
|
|
|
|
campaign2 = Series.select().where(Series.title == "Campaign 2").get()
|
|
campaign1 = Series.select().where(Series.title == "Campaign 1").get()
|
|
|
|
p: Person
|
|
for p in Person.select().join(Series):
|
|
if p.series.slug in colors:
|
|
series_colors = colors[p.series.slug]
|
|
if p.name in series_colors.keys():
|
|
p.color=series_colors[p.name]
|
|
p.save()
|
|
|