205stelzear / elections

Website / Webapp to create and view elections for any Scout group
https://205stelzear-elections.v-ed.ca/
MIT License
0 stars 0 forks source link

All instances of `Utils.mergeObjectTo` doesn't preserve the fact that the object might be of ElectionData type #83

Closed V-ed closed 4 years ago

V-ed commented 4 years ago

With the recent change of handling election data in its own class, the old Utils.mergeObjectTo function is a bit deprecated, and I should add a way to merge response data payloads to the election data object.

Therefore, a new method should be added to the ElectionData to parse response objects and translate their data entried into class attributes.

Until then, this bug prevents the usage of shared elections, as the election data class methods are lost when using the mergeObjectTo (it transforms the ElectionData to an object).