Skip to content

Commit cbc4f4d

Browse files
authored
Merge pull request #138 from openclassify/restorefix
fixed restore 500 error.
2 parents 1f1abcb + 1dcba51 commit cbc4f4d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Adv/AdvModel.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public function configurations()
5454
);
5555
}
5656

57+
public function restore()
58+
{
59+
// added this for fix restore from admin panel, it has given an error about configurations relation.
60+
$this->setAttribute('deleted_at', null);
61+
return $this->save();
62+
}
63+
5764
public function getConfigurations()
5865
{
5966
return $this->getAttribute('configurations');

0 commit comments

Comments
 (0)