Skip to content

Commit

Permalink
Update Attributes.php
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasK authored Oct 20, 2024
1 parent 3f236aa commit a39a34f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/admin/src/Support/Forms/Components/Attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ protected function setUp(): void

if (blank($this->childComponents)) {
$this->schema(function (\Filament\Forms\Get $get, Livewire $livewire, ?Model $record) {
$modelClass = $livewire::getResource()::getModel();

$productTypeId = null;

$morphMap = $modelClass::morphName();
$morphMap = $record ? $record::morphName() : $livewire::getResource()::getModel()::morphName();

$attributeQuery = Attribute::where('attribute_type', $morphMap);

Expand Down

0 comments on commit a39a34f

Please sign in to comment.