[videogames] Fix minor metadata look up bug
This commit is contained in:
@ -29,11 +29,13 @@ def get_or_create_videogame(
|
|||||||
# Create missing platforms and prep for loading after create
|
# Create missing platforms and prep for loading after create
|
||||||
platform_ids = []
|
platform_ids = []
|
||||||
if "platforms" in game_dict.keys():
|
if "platforms" in game_dict.keys():
|
||||||
for platform in game_dict.get("platforms", []):
|
platforms = game_dict.get("platforms", [])
|
||||||
p, _created = VideoGamePlatform.objects.get_or_create(
|
if platforms:
|
||||||
name=platform
|
for platform in game_dict.get("platforms", []):
|
||||||
)
|
p, _created = VideoGamePlatform.objects.get_or_create(
|
||||||
platform_ids.append(p.id)
|
name=platform
|
||||||
|
)
|
||||||
|
platform_ids.append(p.id)
|
||||||
game_dict.pop("platforms")
|
game_dict.pop("platforms")
|
||||||
|
|
||||||
cover_url = game_dict.pop("cover_url")
|
cover_url = game_dict.pop("cover_url")
|
||||||
|
|||||||
Reference in New Issue
Block a user