Skip to content

Commit 10eed7a

Browse files
authored
Discard changes to src/Filament/Integration/Migrations/CustomFieldsMigrator.php
1 parent 1716fde commit 10eed7a

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Filament/Integration/Migrations/CustomFieldsMigrator.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
use Relaticle\CustomFields\FeatureSystem\FeatureManager;
1919
use Relaticle\CustomFields\Models\CustomField;
2020
use Throwable;
21-
use Relaticle\CustomFields\Models\Scopes\CustomFieldsActivableScope;
22-
use Relaticle\CustomFields\Services\TenantContextService;
2321

2422
class CustomFieldsMigrator implements CustomsFieldsMigrators
2523
{
@@ -32,21 +30,15 @@ class CustomFieldsMigrator implements CustomsFieldsMigrators
3230
public function setTenantId(int|string|null $tenantId = null): void
3331
{
3432
$this->tenantId = $tenantId;
35-
36-
TenantContextService::setTenantId($this->tenantId);
3733
}
3834

3935
public function find(string $model, string $code): CustomFieldsMigrator
4036
{
4137
$this->customField = CustomFields::newCustomFieldModel()
4238
->query()
43-
->withoutGlobalScope(CustomFieldsActivableScope::class)
4439
->forMorphEntity((Entities::getEntity($model)?->getAlias()) ?? $model)
4540
->where('code', $code)
46-
->firstOrFail()
47-
;
48-
49-
$this->customField->load('section');
41+
->firstOrFail();
5042

5143
$this->customFieldData = CustomFieldData::from($this->customField);
5244

@@ -191,9 +183,6 @@ public function update(array $data): void
191183
$updateData[config('custom-fields.database.column_names.tenant_foreign_key')] = $this->tenantId;
192184
}
193185

194-
unset($updateData['section']);
195-
unset($updateData['options']);
196-
197186
$this->customField->update($updateData);
198187

199188
if (

0 commit comments

Comments
 (0)