Skip to content

Commit

Permalink
Fixed user field sources not being exported
Browse files Browse the repository at this point in the history
  • Loading branch information
bvangennep committed Nov 14, 2018
1 parent a5f18a2 commit f39895c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 4.0.18
### Fixed
- Fixed user field sources not being exported

### 4.0.17 - 2018-09-24
### Fixed
- Fixed backwards compatibility of element index mapper
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.17",
"version": "4.0.18",
"name": "nerds-and-company/schematic",
"description": "Craft setup and sync tool",
"type": "craft-plugin",
Expand Down
3 changes: 2 additions & 1 deletion src/Behaviors/SourcesBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use yii\base\Behavior;
use craft\base\Model;
use craft\records\VolumeFolder;
use craft\fields\Users;
use NerdsAndCompany\Schematic\Schematic;
use NerdsAndCompany\Schematic\Events\SourceMappingEvent;

Expand Down Expand Up @@ -123,7 +124,7 @@ public function getSource(string $fieldType, string $source = null, string $inde
break;
case 'group':
case 'editCategories':
$service = 'Users' == $fieldType ? Craft::$app->userGroups : Craft::$app->categories;
$service = Users::class == $fieldType ? Craft::$app->userGroups : Craft::$app->categories;
$method = 'getGroupBy';
break;
case 'folder':
Expand Down

0 comments on commit f39895c

Please sign in to comment.