Skip to content

Commit

Permalink
[Fixes #195] Feature dataset attribute requiring a unit entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Wallschlaeger committed Nov 6, 2024
1 parent 1c0eac6 commit 92ad833
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion geonode/layers/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class Meta:
model = Attribute
exclude = (
"attribute_type",
"attribute_unit"
"count",
"min",
"max",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ <h5>{% trans "Attributes" %}</h5>
<th>{% trans "Attribute" %}</th>
<th>{% trans "Label" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Unit" %}</th>
<th>{% trans "Display Order" %}</th>
<th>{% trans "Display Type" %}</th>
<th>{% trans "Visible" %}</th>
Expand All @@ -421,6 +422,7 @@ <h5>{% trans "Attributes" %}</h5>
<td><div style="display:none">{{form.id}}</div>{{form.attribute}}</td>
<td>{{form.attribute_label}}</td>
<td>{{form.description}}</td>
<td>{{form.attribute_unit}}</td>
<td>{{form.display_order}}</td>
<td>{{form.featureinfo_type}}</td>
<td>{{form.visible}}</td>
Expand Down
1 change: 1 addition & 0 deletions geonode/layers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ def dataset_metadata(
la = Attribute.objects.get(id=int(form["id"].id))
la.description = form["description"]
la.attribute_label = form["attribute_label"]
la.attribute_unit = form["attribute_unit"]
la.visible = form["visible"]
la.display_order = form["display_order"]
la.featureinfo_type = form["featureinfo_type"]
Expand Down

0 comments on commit 92ad833

Please sign in to comment.