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
After some analysis, the bug is caused by a 'wrong' categorization of the content_type in the Favorite table.
From the api/v2/resources/{id}/favorite endpoint, the content_type of the resource is set as resourcebase in the favorite table, while from the Layer/Document/app table, is correctly assigned -> ['document', 'geostory', 'map', 'layer']
So this means that the FavoriteFilter when is called, filter for the resource_type available in the queryset (for reducing the weight of the query)
@mattiagiupponi I would be in favour og getting rid of the content_type field, but in this case I guess we need to adapt the rest of GeoNode (templates, etc.). If you think this is doable let's go on with this.
Otherwise we will need to fix the filter endpoint to store the correct content type.
This endpoint:
api/v2/resources?favorite=true
seems not to return all items, analyzing the case, it seems not to return those added by this api:
api/v2/resources/{id}/favorite
In the video I simulate the case, adding an item, in total, my account has 3 favorites
Registrazione.schermo.2021-06-10.alle.10.19.31.mov
the api return one item
Registrazione.schermo.2021-06-10.alle.10.21.50.mov
The text was updated successfully, but these errors were encountered: