You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
I was looking closely at the Stats model and realized that using AgencyObject.stats_set returns the stats from both the Agency and Office. This bug isn't visible because it only affects agencies that have offices and we don't display stats for them.
We can fix the issue by either a quick patch to the API or changing the Stats model to work like the ReadingRoomUrls model. Personally, I rather refactor the Stats model.
The text was updated successfully, but these errors were encountered:
Ok so my bad. This is false alarm. My connect came from this test, which says is testing for both Office and Agency stats but only tests for office stats.
In general, however, we need to be very carful using the Stats model because AgencyObject.stats_set returns the stats for both the AgencyObject and all of its associated offices. I still don't think we should have a model like this but its probably not a priority to change it now.
I was looking closely at the Stats model and realized that using
AgencyObject.stats_set
returns the stats from both the Agency and Office. This bug isn't visible because it only affects agencies that have offices and we don't display stats for them.We can fix the issue by either a quick patch to the API or changing the Stats model to work like the ReadingRoomUrls model. Personally, I rather refactor the Stats model.
The text was updated successfully, but these errors were encountered: