Skip to content

Commit

Permalink
[Links] Fix Metadata Catalogue Records Update
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jun 6, 2019
1 parent cda82f9 commit e2d40c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion geonode/geoserver/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
create_gs_thumbnail,
_stylefilterparams_geowebcache_layer,
_invalidate_geowebcache_layer)
from geonode.catalogue.models import catalogue_post_save
from geonode.base.models import ResourceBase
from geonode.people.models import Profile
from geonode.layers.models import Layer
Expand Down Expand Up @@ -93,7 +94,7 @@ def geoserver_post_save(instance, sender, created, **kwargs):
try:
create_gs_thumbnail(instance, overwrite=True, check_bbox=True)
except BaseException:
logger.warn("!WARNING! - Failure while Creating Thumbnail for Layer [%s]" % (instance.alternate))
logger.warn("Failure Creating Thumbnail for Layer [%s]" % (instance.alternate))


def geoserver_post_save_local(instance, *args, **kwargs):
Expand Down Expand Up @@ -329,6 +330,9 @@ def geoserver_post_save_local(instance, *args, **kwargs):
# Refresh from DB
instance.refresh_from_db()

# Updating the Catalogue
catalogue_post_save(instance=instance, sender=instance.__class__)

# store the resource to avoid another geoserver call in the post_save
if gs_resource:
instance.gs_resource = gs_resource
Expand Down

0 comments on commit e2d40c2

Please sign in to comment.