Skip to content

Commit

Permalink
Trim layer_name length to 50 chars. Resolves #354
Browse files Browse the repository at this point in the history
  • Loading branch information
ingenieroariel committed Oct 10, 2012
1 parent e91e16f commit dad75bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/GeoNodePy/geonode/maps/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ def get_valid_layer_name(layer=None, overwrite=False):
msg = ('You must pass either a filename or a GeoNode layer object')
raise GeoNodeException(msg)

# Trim the layer name's length to 50 chars.
# Workaround for issue #354.
# https://github.com/GeoNode/geonode/issues/354
if len(layer_name)>50:
layer_name = layer_name[:50]

if overwrite:
#FIXME: What happens if there is a store in GeoServer with that name
# that is not registered in GeoNode?
Expand Down

0 comments on commit dad75bb

Please sign in to comment.