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
661debf1
Commit
661debf1
authored
Jan 11, 2016
by
LE GAC Renaud
Browse files
Seperate processing for COM and ACTI in duplicate_conference
parent
581a965b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
modules/check_tools.py
modules/check_tools.py
+13
-14
No files found.
modules/check_tools.py
View file @
661debf1
...
...
@@ -8,6 +8,7 @@ import regex
from
gluon
import
current
from
plugin_dbui
import
(
UNDEF
,
UNDEF_ID
,
get_id
,
get_where_query
)
...
...
@@ -285,36 +286,34 @@ def duplicate_conference(publication):
categories
=
db
.
categories
publications
=
db
.
publications
qcat
=
(
categories
.
code
==
'ACTI'
)
|
\
(
categories
.
code
==
'ACTN'
)
|
\
(
categories
.
code
==
'COM'
)
if
publications
.
id_categories
==
get_id
(
db
.
categories
,
code
=
'COM'
):
qcat
=
categories
.
code
==
'COM'
else
:
qcat
=
(
categories
.
code
==
'ACTI'
)
|
(
categories
.
code
==
'ACTN'
)
qmain
=
get_where_query
(
publications
)
qmain
=
((
qmain
)
&
(
qcat
))
qmain
=
((
qmain
)
&
(
publications
.
id_teams
==
publication
[
'id_teams'
]
))
qmain
=
((
qmain
)
&
(
publications
.
title
==
publication
[
'title'
]
))
qmain
&
=
qcat
qmain
&
=
publications
.
id_teams
==
publication
[
'id_teams'
]
qmain
&
=
publications
.
title
==
publication
[
'title'
]
if
'id'
in
publication
and
publication
[
'id'
]:
qmain
=
((
qmain
)
&
(
publications
.
id
!=
publication
[
'id'
]
))
qmain
&
=
publications
.
id
!=
publication
[
'id'
]
# title, conference title, conference date and conference town
qtitle
=
publications
.
conference_title
==
publication
[
'conference_title'
]
qdates
=
publications
.
conference_dates
==
publication
[
'conference_dates'
]
qtown
=
publications
.
conference_town
==
publication
[
'conference_town'
]
query
=
((
qmain
)
&
(
qtitle
))
query
=
((
query
)
&
(
qdates
))
query
=
((
query
)
&
(
qtown
))
query
=
((
qmain
)
&
(
qtitle
)
&
(
qdates
)
&
(
qtown
))
extend_ids
(
db
,
query
,
ids
)
# title, conference date and conference town
query
=
((
query
)
&
(
qdates
))
query
=
((
query
)
&
(
qtown
))
query
=
((
qmain
)
&
(
qdates
)
&
(
qtown
))
extend_ids
(
db
,
query
,
ids
)
# title, conference title and conference town
query
=
((
qmain
)
&
(
qtitle
))
query
=
((
query
)
&
(
qtown
))
query
=
((
qmain
)
&
(
qtitle
)
&
(
qtown
))
extend_ids
(
db
,
query
,
ids
)
return
ids
...
...
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