mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix: byos firmware setting overrides cloud
This commit is contained in:
parent
ae66d15051
commit
d6533c4447
1 changed files with 6 additions and 6 deletions
|
|
@ -60,11 +60,11 @@ class Device extends Model
|
|||
|
||||
public function getUpdateFirmwareAttribute(): bool
|
||||
{
|
||||
if ($this->proxy_cloud_response && $this->proxy_cloud_response['update_firmware']) {
|
||||
if ($this->update_firmware_id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->update_firmware_id) {
|
||||
if ($this->proxy_cloud_response && $this->proxy_cloud_response['update_firmware']) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -73,10 +73,6 @@ class Device extends Model
|
|||
|
||||
public function getFirmwareUrlAttribute(): ?string
|
||||
{
|
||||
if ($this->proxy_cloud_response && $this->proxy_cloud_response['firmware_url']) {
|
||||
return $this->proxy_cloud_response['firmware_url'];
|
||||
}
|
||||
|
||||
if ($this->update_firmware_id) {
|
||||
$firmware = Firmware::find($this->update_firmware_id);
|
||||
if ($firmware) {
|
||||
|
|
@ -88,6 +84,10 @@ class Device extends Model
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->proxy_cloud_response && $this->proxy_cloud_response['firmware_url']) {
|
||||
return $this->proxy_cloud_response['firmware_url'];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue