Refactor: Loading and saving a game sets ActiveVersion to null

Bug #788075 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MUGLE
Triaged
High
Unassigned

Bug Description

This just happened when I added the ability to save IsPublic. Not sure why (it is now writing to game whereas before it wasn't).

Tags: datastore
Revision history for this message
Matt Giuca (mgiuca) wrote :

Averted as of r428, but it is still a bug. (Demilestoning.)

What is happening is, it's due to the crazy nature of the activeVersion field. Note that getActiveVersion has NO PERMISSIONS because it is loaded specially. But setActiveVersion is set as normal.

Therefore, on the client when the client goes to write to the game, it is set to null (because it can't be gotten), and so it is written back, also null. I worked around this by explicitly setting the activeVersion to gameVersion in the client before writing the game back, but this is horrible.

Fix it by removing the nasty activeVersion hack (just make activeVersion field a normal key, not a special GameVersion object), and introduce a new field to store the actual GameVersion object.

Changed in mugle:
assignee: Matt Giuca (mgiuca) → nobody
importance: Critical → High
milestone: 0.1 → none
Matt Giuca (mgiuca)
summary: - Editing a game clears the ActiveVersion
+ Refactor: Loading and saving a game sets ActiveVersion to null
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.