forked from vieter-v/vieter
Attempt at writing renew_queue function; seems to just stop in the
middle
This commit is contained in:
parent
ff57d73998
commit
f7e1aba30b
10 changed files with 89 additions and 30 deletions
|
|
@ -15,7 +15,7 @@ pub mut:
|
|||
// Which repo the builder should publish packages to
|
||||
repo string
|
||||
// Cron schedule describing how frequently to build the repo.
|
||||
schedule string
|
||||
schedule string [optional]
|
||||
}
|
||||
|
||||
// patch_from_params patches a GitRepo from a map[string]string, usually
|
||||
|
|
@ -74,7 +74,7 @@ pub fn repo_from_params(params map[string]string) ?GitRepo {
|
|||
// If we're creating a new GitRepo, we want all fields to be present before
|
||||
// "patching".
|
||||
$for field in GitRepo.fields {
|
||||
if field.name !in params {
|
||||
if field.name !in params && !field.attrs.contains('optional') {
|
||||
return error('Missing parameter: ${field.name}.')
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue