Adding new migration and attempting to fix a bug.

This commit is contained in:
sergiotarxz 2023-08-08 19:46:41 +02:00
parent fb75027c3e
commit 67c2407ae4
2 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,7 @@ sub MIGRATIONS {
'ALTER TABLE requests ADD COLUMN subdivision TEXT;',
'CREATE INDEX request_subdivision_index on requests (subdivision);',
\&_populate_locations,
\&_populate_locations,
);
}

View File

@ -54,8 +54,8 @@ sub _register_request_query ( $self, $remote_address, $user_agent,
$params_json, $path, $referer )
{
my $dbh = BurguillosInfo::DB->connect($app);
my $country = $self->_get_country('185.244.231.157');
my $subdivision = $self->_get_subdivision('185.244.231.157');
my $country = $self->_get_country($remote_address);
my $subdivision = $self->_get_subdivision($remote_address);
$dbh->do(
<<'EOF', undef, $remote_address, $user_agent, $params_json, $path, $referer, $country, $subdivision );