Skip to content

Commit

Permalink
[Fixes #10777] Favorites fail looking for ContentType of old GeoNode …
Browse files Browse the repository at this point in the history
…instances (#10778)

Co-authored-by: Giovanni Allegri <[email protected]>
  • Loading branch information
afabiani and giohappy authored Mar 20, 2023
1 parent e7620ef commit f887a20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geonode/favorite/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def create_favorite(self, content_object, user):
if content_object.resource_type in geoapp_types:
content_type = ContentType.objects.get(model="geoapp")
else:
content_type = ContentType.objects.get(model=content_object.resource_type)
content_type = ContentType.objects.filter(model=content_object.resource_type).last()
else:
content_type = ContentType.objects.get_for_model(type(content_object))

Expand Down

0 comments on commit f887a20

Please sign in to comment.