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

Add defaultValue to file-widget default config #10181

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 arches/app/media/js/viewmodels/file-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
'bindings/dropzone'
], function($, ko, _, arches, Dropzone, uuid, WidgetViewModel) {
/**
* A viewmodel used for domain widgets
* A viewmodel used for file widgets
*
* @constructor
* @name FileWidgetViewModel
Expand Down
24 changes: 24 additions & 0 deletions arches/app/models/migrations/10150_add_default_value_file_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.4 on 2023-10-23 13:50

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("models", "10149_add_workflow_name_to_workflow_history"),
]

operations = [
migrations.RunSQL(
sql="""
UPDATE widgets
SET defaultconfig = jsonb_set(defaultconfig, '{defaultValue}', '[]')
WHERE name = 'file-widget';
""",
reverse_sql="""
UPDATE widgets
SET defaultconfig = defaultconfig - 'defaultValue'
WHERE name = 'file-widget';
""",
),
]
Loading