mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-20 02:17:09 +00:00
fix(resources): preserve records sharing IDs across model types (#11300)
This commit is contained in:
1 parent
bb9f5e5768
commit
1440d35750
6 files changed
+109
-9
No files matched your search
@@ -166,13 +166,13 @@ class Project extends BaseModel
|
||||
public function databases(array $with = []): Collection
|
||||
{
|
||||
return $this->postgresqls()->with($with)->get()
|
||||
->merge($this->redis()->with($with)->get())
|
||||
->merge($this->mongodbs()->with($with)->get())
|
||||
->merge($this->mysqls()->with($with)->get())
|
||||
->merge($this->mariadbs()->with($with)->get())
|
||||
->merge($this->keydbs()->with($with)->get())
|
||||
->merge($this->dragonflies()->with($with)->get())
|
||||
->merge($this->clickhouses()->with($with)->get());
|
||||
->concat($this->redis()->with($with)->get())
|
||||
->concat($this->mongodbs()->with($with)->get())
|
||||
->concat($this->mysqls()->with($with)->get())
|
||||
->concat($this->mariadbs()->with($with)->get())
|
||||
->concat($this->keydbs()->with($with)->get())
|
||||
->concat($this->dragonflies()->with($with)->get())
|
||||
->concat($this->clickhouses()->with($with)->get());
|
||||
}
|
||||
|
||||
public function navigateTo()
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
|
||||
|
||||
// Delete non-instance-wide sources owned by this team
|
||||
$teamSources = GithubApp::where('team_id', $team->id)->get()
|
||||
->merge(GitlabApp::where('team_id', $team->id)->get());
|
||||
->concat(GitlabApp::where('team_id', $team->id)->get());
|
||||
foreach ($teamSources as $source) {
|
||||
$source->delete();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user