Skip to content

Commit

Permalink
Fix not being able to update builder due to unexpected type (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
GDay authored Sep 7, 2024
1 parent 660fc12 commit c8cbf02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion back/admin/integrations/builder_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def form_valid(self, form):
)
return render(
self.request,
self.template_name,
"manifest_test/revoke_disabled_form.html",
{"form": form, "index": self.kwargs["index"], "integration": self.object},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h3>{% trans "Execute" %}</h3>
<h3> {% translate "Add execute item" %}</h3>
<form hx-post="{% url 'integrations:manifest-execute-add' integration.id %}" hx-select="#form_form" hx-target="#form_form">
{% crispy form %}
<button class="btn btn-primary">{% translate "Add revoke item" %}</button>
<button class="btn btn-primary">{% translate "Add execute item" %}</button>
</form>
</div>
</div>
2 changes: 1 addition & 1 deletion back/admin/integrations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def convert_object_to_array(obj):

def prepare_initial_data(obj):
if isinstance(obj, dict):
if obj.get("headers"):
if obj.get("headers") and not isinstance(obj["headers"], list):
obj["headers"] = convert_object_to_array(obj["headers"])
return obj

Expand Down

0 comments on commit c8cbf02

Please sign in to comment.