Fix protocol import for empty metadata [SCI-7915] (#4996)

This commit is contained in:
ajugo 2023-02-20 13:21:01 +01:00 committed by GitHub
parent 94b5b4a425
commit c1f55e99a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,7 @@ class ProtocolsImporterV2
table: Table.new(
name: params['name'],
contents: Base64.decode64(params['contents']),
metadata: JSON.parse(params['metadata'] || '{}'),
metadata: JSON.parse(params['metadata'].presence || '{}'),
created_by: @user,
last_modified_by: @user,
team: @team