From eb507d1babbddd062602c8d19c3081aeffdc365a Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Sun, 10 Jun 2018 11:59:21 +0200 Subject: [PATCH 1/2] Update schema.rb to correct problem "ActiveRecord::StatementInvalid: Mysql2::Error: BLOB/TEXT column 'tags' can't have a default value:" when we migration on mysql database --- db/schema.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index d64b574b..d89b2fe7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -66,7 +66,7 @@ ActiveRecord::Schema.define(version: 20180408212139) do t.string "contact", limit: 255, default: "" t.string "submitter", limit: 255, default: "", null: false t.integer "moderated", limit: 4, default: 0, null: false - t.text "tags", limit: 255, default: "" + t.text "tags", limit: 255, null: true t.string "secret", limit: 255, default: "", null: false t.datetime "decision_time" t.datetime "submission_time" @@ -119,7 +119,7 @@ ActiveRecord::Schema.define(version: 20180408212139) do t.datetime "created_at" t.datetime "updated_at" t.text "tag" - t.text "tags", default: "" + t.text "tags", null: true t.text "diaspora" t.text "object_changes" t.text "place_name" From ee18ee36e199817c902fc266f7aa77fa928c6f10 Mon Sep 17 00:00:00 2001 From: Florent Fayolle Date: Mon, 29 Oct 2018 21:26:34 +0100 Subject: [PATCH 2/2] adl-submit.py: use in order to load remote resources in preview --- public/adl-submit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/adl-submit.py b/public/adl-submit.py index 598f5a7b..a86f357e 100755 --- a/public/adl-submit.py +++ b/public/adl-submit.py @@ -356,7 +356,7 @@ def SubmitEvent(event, testOutputFile): sys.exit(0) fp = open(testOutputFile, "w") s = contents.getvalue().decode() - s = re.sub(r'href="([A-Za-z0-9]*).css"', r'href="'+baseUrl+'\1.css"', s) + s = re.sub(r'', r'\g<0>' % baseUrl, s, flags=re.IGNORECASE) fp.write(s) fp.close()