From c7c0c8c108813f3d730c34e3bff2d03d9c8252ef Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Sun, 13 Feb 2022 09:49:08 +0700 Subject: [PATCH] Textadventures: no ambiguity in IDs --- app/Sources/Textadventures.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Sources/Textadventures.php b/app/Sources/Textadventures.php index 6d876d4..0e00511 100644 --- a/app/Sources/Textadventures.php +++ b/app/Sources/Textadventures.php @@ -87,7 +87,7 @@ class Textadventures extends Source { } $game->save(); $game->languages()->sync([$language->id]); - if (isset($author) && !$game->authors()->where('id', $model->id)->exists()) { + if (isset($author) && !$game->authors()->where('authors.id', $model->id)->exists()) { $game->authors()->attach($model); } });