Closed RobRuana closed 6 years ago
@EliAndrewC, pinging you because you requested an update about this when I figured it out.
This issue occurs because development-defaults.ini
is loaded first, and then development.ini
is merged in afterward. The [[camping_type]]
as listed in development-defaults.ini
looks like this:
[[camping_type]]
small_tent = "Small Tent (6 or fewer)"
large_tent = "Large Tent (more than 6)"
car = "Sleeping in car"
rv = "RV or other larger vehicle (Additional fees may apply; please contact us)"
As you can see, the additional enum
values from development.ini
are appended to the list, instead of being interleaved in the order listed in development.ini
.
The proper solution to this issue would involve modifying the merge()
algorithm used by ConfigObj
to interleave new scalar
values relative to scalar
values that already exist in the parent ConfigObj
instance. That is no small task.
So instead—as a quick 'n dirty hack—I am going to update development-defaults.ini
to look like this:
[[camping_type]]
small_tent = "Small Tent (6 or fewer)"
medium_tent = ""
large_tent = "Large Tent (more than 6)"
car = "Sleeping in car"
rv = "RV or other larger vehicle (Additional fees may apply; please contact us)"
special_site = ""
cabin = ""
That will preserve the order of the enum
, while still allowing us to remove meduim_tent
, special_site
, and cabin
from our deployment, if we wish.
Ahhhh, that makes sense, thanks for the update!
Thx Rob!!
On Fri, Mar 2, 2018 at 11:14 AM, Eli Courtwright notifications@github.com wrote:
Ahhhh, that makes sense, thanks for the update!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/magfest/magstock/issues/144#issuecomment-369968736, or mute the thread https://github.com/notifications/unsubscribe-auth/AHOeKZTuLmiujLIty_sOaH62sEhM1qFnks5taW_9gaJpZM4SaDVH .
As listed in
development.ini
As displayed in prereg user interface