Textadventures: no ambiguity in IDs

This commit is contained in:
Alexander Yakovlev 2022-02-13 09:49:08 +07:00
parent 45d947c637
commit c7c0c8c108
Signed by: oreolek
GPG key ID: 8D24103F5EE2A6C0

View file

@ -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);
}
});