1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-30 07:26:24 +01:00

Fix problema lettura modulo da plugin

This commit is contained in:
FabioL 2024-03-22 17:11:27 +01:00
parent 0b03fb8d1e
commit e58f728c6f
2 changed files with 2 additions and 7 deletions

View File

@ -128,14 +128,9 @@ class Plugin extends Model
return $this->belongsTo(Module::class, 'idmodule_from');
}
public function module()
{
return $this->belongsTo(Module::class, 'idmodule_to');
}
public function getModuleAttribute()
{
return '';
return $this->belongsTo(Module::class, 'idmodule_to');
}
public static function getTranslatedFields()

View File

@ -96,7 +96,7 @@ class Plugins
// Fix modulo
$plugin = self::getCurrent();
if (isset($plugin)) {
Modules::setCurrent($plugin->module->id);
Modules::setCurrent($plugin->module->first()->id);
}
}