Skip to content

Commit

Permalink
fix(galleries): fix collaborator approval scope (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
itinerare authored Jan 13, 2025
1 parent 8b12dff commit 7255b00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/Gallery/GallerySubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ public function scopePending($query) {
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeCollaboratorApproved($query) {
return $query->whereHas('collaborators', function ($query) {
$query->where('has_approved', 1);
return $query->whereDoesntHave('collaborators', function ($query) {
$query->where('has_approved', 0);
})->orWhereDoesntHave('collaborators');
}

Expand Down

0 comments on commit 7255b00

Please sign in to comment.