mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 02:54:38 +00:00
firmware: deal with subscription preset in factory reset
This isn't ideal but it lets us run a migration and validate it.
This commit is contained in:
parent
165327ba72
commit
63e533f216
@ -127,7 +127,7 @@ class Firmware extends BaseModel
|
||||
$messages->appendMessage(new Message(gettext('Unable to set invalid firmware release type'), 'type'));
|
||||
}
|
||||
if (in_array((string)$this->mirror, $validOptions['mirrors_has_subscription'])) {
|
||||
if (!preg_match('/^[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}$/i', (string)$this->subscription)) {
|
||||
if (!preg_match('/^[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}$/i', (string)$this->subscription) && 'FILL-IN-YOUR-LICENSE-HERE' != (string)$this->subscription) {
|
||||
$messages->appendMessage(new Message(gettext('A valid subscription is required for this firmware mirror'), 'subscription'));
|
||||
}
|
||||
if (!preg_match('/\//', (string)$this->flavour)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user