summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VNDB/Handler/VNEdit.pm4
-rwxr-xr-xutil/vndb.pl2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/VNEdit.pm b/lib/VNDB/Handler/VNEdit.pm
index 1883b072..4ec25605 100644
--- a/lib/VNDB/Handler/VNEdit.pm
+++ b/lib/VNDB/Handler/VNEdit.pm
@@ -117,12 +117,12 @@ sub edit {
{ post => 'anime', required => 0, default => '' },
{ post => 'image', required => 0, default => 0, template => 'id' },
{ post => 'img_nsfw', required => 0, default => 0 },
- { post => 'credits', template => 'json', json_fields => [
+ { post => 'credits', required => 0, template => 'json', json_fields => [
{ field => 'aid', required => 1, template => 'id' },
{ field => 'role', required => 1, enum => $self->{staff_roles} },
{ field => 'note', required => 0, maxlength => 250, default => '' },
]},
- { post => 'seiyuu', template => 'json', json_fields => [
+ { post => 'seiyuu', required => 0, template => 'json', json_fields => [
{ field => 'aid', required => 1, template => 'id' },
{ field => 'cid', required => 1, template => 'id' },
{ field => 'note', required => 0, maxlength => 250, default => '' },
diff --git a/util/vndb.pl b/util/vndb.pl
index fd70e564..30cdecbe 100755
--- a/util/vndb.pl
+++ b/util/vndb.pl
@@ -55,7 +55,7 @@ TUWF::set(
uname => { regex => qr/^[a-z0-9-]*$/, minlength => 2, maxlength => 15 },
gtin => { func => \&gtintype },
editsum => { maxlength => 5000, minlength => 2 },
- json => { func => \&json_validate, inherit => ['json_fields'], default => [] },
+ json => { func => \&json_validate, inherit => ['json_fields'], default => '[]' },
},
);
TUWF::load_recursive('VNDB::Util', 'VNDB::DB', 'VNDB::Handler');