Skip to content

Commit

Permalink
FIX: adding caller class parameter to DataObject get
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Manu authored and chillu committed Jan 5, 2015
1 parent 76145df commit 13271a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SilverStripe/BehatExtension/Context/FixtureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function stepIAssignObjToObj($type, $value, $relationType, $relationId) {
else $field = "ID";

// Check if the fixture object exists - if not, we create it
$obj = \DataObject::get()->filter($field, $value)->first();
$obj = \DataObject::get($class)->filter($field, $value)->first();
if(!$obj) $obj = $this->fixtureFactory->createObject($class, $value);
// If has_many or many_many, add this fixture object to the relation object
// If has_one, set value to the joint field with this fixture object's ID
Expand Down

0 comments on commit 13271a8

Please sign in to comment.