Skip to content

Commit

Permalink
Merge pull request #18 from tanthammar/patch-1
Browse files Browse the repository at this point in the history
Avoid problems with seeders and factories
  • Loading branch information
oliuz authored Jan 12, 2022
2 parents 325f37e + 94e868e commit 7dc7557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/TeamworkTeam.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected static function boot()
static::creating(function ($model) {
$model->uuid = (string)Uuid::uuid1();
$model->slug = Str::slug($model->name);
$model->owner_id = auth()->user()->getKey();
$model->owner_id = $model->owner_id ?? auth()->user()->getKey();
});

static::updating(function ($model) {
Expand Down

0 comments on commit 7dc7557

Please sign in to comment.