[GeoNode-users] How can I update the layers thumnails in GeoNode?

Eloi eloi at openmailbox.org
Thu Mar 9 05:41:06 PST 2017


On 2017-03-09 09:28, Simone Dalmasso wrote:

> in python (script or shell):
> from geonode.layers.models import Layer
> for layer in Layer.objects.all(): layer.save()

workon geonode
python manage.py shell
from geonode.layers.models import Layer
for layer in Layer.objects.all(): layer.save()
...
Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File 
"/home/www-geonode/geonode/.venvs/geonode/local/lib/python2.7/site-packages/polymorphic/models.py", 
line 90, in save
     return super(PolymorphicModel, self).save(*args, **kwargs)
   File 
"/home/www-geonode/geonode/.venvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", 
line 734, in save
     force_update=force_update, update_fields=update_fields)
   File 
"/home/www-geonode/geonode/.venvs/geonode/local/lib/python2.7/site-packages/django/db/models/base.py", 
line 758, in save_base
     update_fields=update_fields)
   File 
"/home/www-geonode/geonode/.venvs/geonode/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", 
line 189, in send
     response = receiver(signal=self, sender=sender, **named)
   File 
"/home/www-geonode/geonode/src/geonode/geonode/geoserver/signals.py", 
line 106, in geoserver_pre_save
     gs_resource.title = instance.title
AttributeError: 'NoneType' object has no attribute 'title'

I check and all layers have a title. Any clue?

Cheers,

Eloi


More information about the geonode-users mailing list