1. Alexander Schremmer
  2. domination

Commits

Alexander Schremmer  committed 5dc016d

Fix game cloning.

  • Participants
  • Parent commits e31c703
  • Branches default

Comments (0)

Files changed (2)

File domination/main.py

View file
         newname = "%s (%i)" % (name, ctr)
     if "card" in request.args:
         enabled_cards = set(request.args.getlist("card"))
-        enabled_editions = set(c.edition.name for c in CardTypeRegistry.keys2classes(request.form.getlist('card_key')))
+        enabled_editions = set(c.edition.key for c in CardTypeRegistry.keys2classes(request.args.getlist('card')))
     else:
         enabled_cards = enabled_editions = ()
     return render_template("create_game.html", editions=editions,

File domination/templates/create_game.html

View file
     <p>{% trans %}Editions:{% endtrans %}
       {% for edition in editions %}
       <input type="checkbox" name="edition" value="{{ edition.key }}"
-      {% if not edition.optional %}checked="checked" disabled="disabled"{% else %}{% if edition.name in enabled_editions %}checked="checked"{% endif %}{% endif %}>
+      {% if not edition.optional %}checked="checked" disabled="disabled"{% else %}{% if edition.key in enabled_editions %}checked="checked"{% endif %}{% endif %}>
       {{ edition.name }}
       {% endfor %}
     </p>