Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not being able to update builder due to unexpected type #505

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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