Fix for models that don't yet exist
Credit to @bennothommo. Fixes https://github.com/octobercms/october/pull/3908#issuecomment-447291101 Co-Authored-By: LukeTowers <github@luketowers.ca>
This commit is contained in:
parent
ab6023f3e9
commit
28ac50ab28
|
|
@ -85,6 +85,10 @@ class AutoDatasource extends Datasource implements DatasourceInterface
|
|||
*/
|
||||
public function sourceHasModel(string $source, Model $model)
|
||||
{
|
||||
if (!$model->exists) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = false;
|
||||
|
||||
$sourcePaths = $this->getSourcePaths($source);
|
||||
|
|
|
|||
Loading…
Reference in New Issue