mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -04:00
Replace static GetOrCreate with GetByNameOrCreate
This commit is contained in:
parent
4a1a4efb24
commit
cc8de11ca4
3 changed files with 10 additions and 10 deletions
|
@ -621,7 +621,7 @@ class Ebook{
|
|||
private function InsertTagStrings(): void{
|
||||
$tags = [];
|
||||
foreach($this->Tags as $ebookTag){
|
||||
$tags[] = EbookTag::GetOrCreate($ebookTag);
|
||||
$tags[] = $ebookTag->GetByNameOrCreate($ebookTag->Name);
|
||||
}
|
||||
$this->Tags = $tags;
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ class Ebook{
|
|||
private function InsertLocSubjectStrings(): void{
|
||||
$subjects = [];
|
||||
foreach($this->LocSubjects as $locSubject){
|
||||
$subjects[] = LocSubject::GetOrCreate($locSubject);
|
||||
$subjects[] = $locSubject->GetByNameOrCreate($locSubject->Name);
|
||||
}
|
||||
$this->LocSubjects = $subjects;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue