Skip to content

Commit

Permalink
0.9.4 (#404)
Browse files Browse the repository at this point in the history
* fix importing int values in data importer

* handle geography column type in plugin migrations

* fix getting plugin in delete endpoint
  • Loading branch information
v1r0x authored Oct 28, 2022
1 parent f8453d6 commit f5d05e6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

## 0.9.4
### Fixed
- Error on deleting plugin (Plugin not found)
- Allow `geography` as column type in plugin migrations
- Importing values for integer/percentage datatype in data importer

## 0.9.3
### Fixed
- Wrong translated concepts for languages with lang code mismatch
Expand Down
2 changes: 1 addition & 1 deletion app/AttributeValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static function stringToValue($strValue, $type) {
break;
case 'integer':
case 'percentage':
if(!is_int($trimmedVal)) {
if(!is_int($trimmedVal) && !ctype_digit($trimmedVal)) {
throw new InvalidDataException("Given data is not an integer");
}
$value = intval($trimmedVal);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/PluginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function uninstallPlugin(Request $request, $id) {

public function removePlugin(Request $request, $id) {
try {
$plugin = Plugin::firstOrFail($id);
$plugin = Plugin::findOrFail($id);
} catch (ModelNotFoundException $e) {
return response()->json([
'error' => __('This plugin does not exist.')
Expand Down
5 changes: 4 additions & 1 deletion app/MigrationHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ private static function createFromType(Blueprint $table, string $columnName, Mig
$addedColumn = $table->timestamp($columnName);
}
break;
case 'geography':
$addedColumn = $table->geography($columnName);
break;
}

return $addedColumn;
Expand Down Expand Up @@ -370,4 +373,4 @@ public function changeColumn(string $tbl, string $column, array $options) : void

activity()->enableLogging();
}
}
}

0 comments on commit f5d05e6

Please sign in to comment.