mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 03:36:44 +08:00
SCI-2982, handle the empty json condition
This commit is contained in:
parent
ed388db723
commit
3ec62758fe
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
class JsonbHashSerializer
|
||||
def self.dump(hash)
|
||||
hash.to_json
|
||||
hash.nil? ? "{}" : hash.to_json
|
||||
end
|
||||
|
||||
def self.load(hash)
|
||||
|
|
Loading…
Reference in a new issue