Skip to content

Commit 7ee060f

Browse files
fix: overdue embargo handling (#1415)
* fix: overdue embargo handling state and notices * composer update
1 parent ac4801c commit 7ee060f

6 files changed

Lines changed: 254 additions & 195 deletions

File tree

‎app/Models/Project.php‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use App\Notifications\ProjectDeletionReminderNotification;
1010
use App\Traits\CacheClear;
1111
use Auth;
12-
use Carbon\Carbon;
1312
use Illuminate\Database\Eloquent\Casts\Attribute;
1413
use Illuminate\Database\Eloquent\Factories\HasFactory;
1514
use Illuminate\Database\Eloquent\Model;
@@ -106,17 +105,7 @@ public function getProjectPhotoUrlAttribute()
106105

107106
public function getIsPublishedAttribute()
108107
{
109-
if ($this->is_public) {
110-
return true;
111-
} else {
112-
if ($this->release_date && $this->doi) {
113-
return Carbon::now()->startOfDay()->gte($this->release_date);
114-
} else {
115-
return false;
116-
}
117-
}
118-
119-
return false;
108+
return (bool) $this->is_public;
120109
}
121110

122111
/**

0 commit comments

Comments
 (0)