-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now thumbanils are not generate from layers which are created. Fixes #…
- Loading branch information
Showing
3 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+121 KB
(310%)
geonode/contrib/worldmap/wm_extra/static/wm_extra/img/missing_thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
from geonode.layers.utils import create_gs_thumbnail_geonode | ||
from geonode.layers.models import Layer | ||
from geonode.contrib.createlayer.utils import DATA_QUALITY_MESSAGE | ||
|
||
def create_wm_thumbnail(instance, overwrite=False): | ||
""" | ||
WorldMap doesn't use thumbnails from GeoServer, but just the ones from html. | ||
""" | ||
# we use the standard way just for layers, not for maps | ||
if isinstance(instance, Layer): | ||
create_gs_thumbnail_geonode(instance) | ||
# layer created by createlayer application don't need a thumbnail | ||
if not instance.data_quality_statement == DATA_QUALITY_MESSAGE: | ||
create_gs_thumbnail_geonode(instance) | ||
else: | ||
return None |