Merge pull request 'fix bug' (#12) from bugfix/film-multiple-times-with-same-reference into master
Reviewed-on: #12
This commit is contained in:
commit
41860df682
|
@ -51,8 +51,11 @@ def get_films_by_reference(viewings):
|
||||||
page_url = VCinemaUtils.generate_wikipedia_url(page_title)
|
page_url = VCinemaUtils.generate_wikipedia_url(page_title)
|
||||||
|
|
||||||
if page_title in films_by_reference.keys():
|
if page_title in films_by_reference.keys():
|
||||||
films_by_reference[page_title]["films"].append(viewing)
|
|
||||||
films_by_reference[page_title]["keywords"].append(keyword)
|
films_by_reference[page_title]["keywords"].append(keyword)
|
||||||
|
|
||||||
|
if viewing not in films_by_reference[page_title]["films"]:
|
||||||
|
films_by_reference[page_title]["films"].append(viewing)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
films_by_reference[page_title] = {"url": page_url,
|
films_by_reference[page_title] = {"url": page_url,
|
||||||
"keywords": [keyword],
|
"keywords": [keyword],
|
||||||
|
|
Loading…
Reference in New Issue