Skip to content

Commit

Permalink
fix encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
matyaskopp committed Sep 12, 2017
1 parent e609386 commit f7dfc34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/PMLTQ/Server/Controller/User/QueryFile/QueryRecord.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package PMLTQ::Server::Controller::User::QueryFile::QueryRecord;

use Mojo::Base 'PMLTQ::Server::Controller::CRUD';
use PMLTQ::Server::Validation;
use Encode qw(encode_utf8);

has resultset_name => 'QueryRecord';

Expand Down Expand Up @@ -33,7 +34,7 @@ sub _validate {
}

$data = $c->do_validation($rules, $data);
$data->{hash} = collapse_query()->($data->{query});
$data->{hash} = encode_utf8(collapse_query()->($data->{query}));
$data->{user_id} = $c->current_user->id;

$data->{query_file_id} ||= $c->stash->{query_file}->id;
Expand Down

0 comments on commit f7dfc34

Please sign in to comment.