1
0
Fork 0
forked from OpenNeo/impress
impress/app/models
Emi Matchu dc44b4dbb3 Oops, fix bug with saving outfits of pets loaded from Neopets.com
Okay right, the wardrobe-2020 app treats `state` as a bit of an
override thing, and `pose` is the main canonical field for how a pet
looks. We were missing a few pieces here:

1. After loading a pet, we weren't including the `pose` field in the
   initial query string for the wardrobe URL, but we _were_ including
   the `state` field, so the outfit would get set up with a conflicting
   pet state ID vs pose.
2. When saving an outfit, we weren't taking the `state` field into
   account at all. This could cause the saved outfit to not quite match
   how it actually looked in-app, because the default pet state for
   that species/color/pose trio could be different; and regardless, the
   outfit state would come back with `appearanceId` set to `null`,
   which wouldn't match the local outfit state, which would trigger an
   infinite loop.

Here, we complete the round-trip of the `state` field, from pet loading
to outfit saving to the outfit data that comes back after saving!
2024-02-08 09:51:31 -08:00
..
item Start migrating off globalize gem for zones 2024-01-23 05:43:00 -08:00
alt_style.rb Add SVG support to alt styles 2024-01-31 03:02:19 -08:00
application_record.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
auth_record.rb Add AuthUser model, connecting to openneo_id db 2023-10-23 19:05:07 -07:00
auth_user.rb Clarify the error behavior on AuthUser syncing 2023-10-23 19:05:08 -07:00
campaign.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
closet_hanger.rb Basic trade hangers page, just content and without style 2024-01-21 03:10:06 -08:00
closet_list.rb Oops, fix bug that would sometimes flip own/want in the item bulk menu 2024-01-23 04:06:58 -08:00
closet_visibility.rb Delete a couple unused accessors 2023-11-11 15:42:08 -08:00
color.rb Fully disable model translations for Color/Species/Zone 2024-02-03 08:13:14 -08:00
contribution.rb Track contributions of Alt Styles 2024-01-24 03:54:43 -08:00
donation.rb Mark some more relationships as optional 2023-10-23 19:05:07 -07:00
donation_feature.rb Mark some more relationships as optional 2023-10-23 19:05:07 -07:00
item.rb Start migrating off globalize gem for zones 2024-01-23 05:43:00 -08:00
item_outfit_relationship.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
neopets_connection.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
neopets_page.rb Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
outfit.rb Oops, fix bug with saving outfits of pets loaded from Neopets.com 2024-02-08 09:51:31 -08:00
parent_swf_asset_relationship.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
pet.rb Oops, fix bug with saving outfits of pets loaded from Neopets.com 2024-02-08 09:51:31 -08:00
pet_state.rb Remove logic to auto-detect Unconverted pets (fixes Baby Pteri bug) 2024-02-01 01:40:50 -08:00
pet_type.rb Fix mistake in pet loading error handling 2024-02-01 07:21:47 -08:00
species.rb Fully disable model translations for Color/Species/Zone 2024-02-03 08:13:14 -08:00
swf_asset.rb Add SVG support to alt styles 2024-01-31 03:02:19 -08:00
user.rb Oops, load the data for the bulk item quantity form on the trades page! 2024-01-21 06:42:24 -08:00
zone.rb Fully disable model translations for Color/Species/Zone 2024-02-03 08:13:14 -08:00