Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
limbra
limbra
Commits
6d85982e
Commit
6d85982e
authored
Nov 05, 2019
by
LE GAC Renaud
Browse files
Update model_core and harvester to explicit foreign keys id_projects and id_teams (web2py 2.18.3)
parent
eeed4b57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
modules/model_core.py
modules/model_core.py
+6
-1
modules/model_harvester.py
modules/model_harvester.py
+8
-0
No files found.
modules/model_core.py
View file @
6d85982e
...
...
@@ -466,6 +466,7 @@ class Core(object):
Field
(
"id_projects"
,
"reference projects"
,
default
=
UNDEF_ID
,
label
=
"Project"
,
notnull
=
True
),
...
...
@@ -503,12 +504,16 @@ class Core(object):
# rule: 30 Dec 2012
table
.
defense
.
requires
=
IS_EMPTY_OR
(
IS_MATCH
(
REG_DEFENSE
))
table
.
id_publishers
.
requires
=
IS_IN_DB
(
db
,
"publishers.abbreviation"
)
# rule: 10-14 Dec 2012 or 28 Jun - 4 Jul 2012
table
.
conference_dates
.
requires
=
IS_EMPTY_OR
(
IS_MATCH
(
REG_CONF_DATES
))
table
.
conference_url
.
requires
=
IS_EMPTY_OR
(
IS_URL
())
table
.
id_publishers
.
requires
=
IS_IN_DB
(
db
,
"publishers.abbreviation"
)
table
.
id_projects
.
requires
=
IS_IN_DB
(
db
,
"projects.project"
)
table
.
id_teams
.
requires
=
IS_IN_DB
(
db
,
"teams.team"
)
table
.
origin
.
requires
=
IS_EMPTY_OR
(
IS_MATCH
(
REG_VALID_ORIGIN
))
table
.
publication_url
.
requires
=
IS_EMPTY_OR
(
IS_URL
())
...
...
modules/model_harvester.py
View file @
6d85982e
...
...
@@ -204,6 +204,11 @@ class Harvester(object):
table
.
host
.
filter_in
=
CLEAN_SPACES
table
.
controller
.
requires
=
IS_IN_DB
(
db
,
"controllers.controller"
)
table
.
id_categories
.
requires
=
IS_IN_DB
(
db
,
"categories.code"
)
table
.
id_projects
.
requires
=
IS_IN_DB
(
db
,
"projects.project"
)
table
.
id_teams
.
requires
=
IS_IN_DB
(
db
,
"teams.team"
)
table
.
host
.
requires
=
IS_IN_SET
(
STORES
)
return
table
...
...
@@ -239,6 +244,9 @@ class Harvester(object):
Field
(
"authors"
,
"text"
,
comment
=
tp_authors_cppm
,
notnull
=
True
),
migrate
=
"my_authors.table"
)
table
.
id_projects
.
requires
=
IS_IN_DB
(
db
,
"projects.project"
)
table
.
id_teams
.
requires
=
IS_IN_DB
(
db
,
"teams.team"
)
table
.
year
.
requires
=
IS_INT_IN_RANGE
(
1900
,
year
+
1
)
return
table
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment