Fixed issue with undefined env var, and bad reverse counting of days

This commit is contained in:
Tom Bloor 2017-06-12 23:30:40 +01:00
parent 606d5bffc2
commit 392d7f3a7a
2 changed files with 7 additions and 3 deletions

View file

@ -18,7 +18,7 @@ sub run {
return;
}
if ( $ENV{MOJO_MODE} eq 'production' || $self->app->mode eq 'production' ) {
if ( ( defined( $ENV{MOJO_MODE} ) && $ENV{MOJO_MODE} eq 'production' ) || $self->app->mode eq 'production' ) {
say "Will not run dev data fixtures in production!";
return;
}