Commit c6a33bf1 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

In order to be compatible with MySQL, rename the table degrees as

levels and the associated fields.
parent 3482c4a0
......@@ -67,9 +67,9 @@ def basic():
diplomas.decode_request()
query = diplomas.query()
id_phd = get_id(db, 'degrees', degree='PhD')
id_phd = get_id(db, 'levels', level='PhD')
if id_phd:
q_phds = (query) & (db.diplomas.id_degrees == id_phd)
q_phds = (query) & (db.diplomas.id_levels == id_phd)
phds = db(q_phds).select(db.diplomas.year,
db.diplomas.title,
db.diplomas.author,
......
......@@ -75,9 +75,9 @@ def basic():
count = db.diplomas.year.count()
id_phd = get_id(db, 'degrees', degree='PhD')
id_phd = get_id(db, 'levels', level='PhD')
if id_phd:
q_phds = (query) & (db.diplomas.id_degrees == id_phd)
q_phds = (query) & (db.diplomas.id_levels == id_phd)
rows = db(q_phds).select(db.diplomas.year,
count,
......
doc/database.png

120 KB | W: | H:

doc/database.png

122 KB | W: | H:

doc/database.png
doc/database.png
doc/database.png
doc/database.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -22,4 +22,4 @@
<type label="Upload" length="0" sql="upload" quote="'"/>
<type label="Password" length="0" sql="password" quote="'"/>
</group>
</datatypes><table x="70" y="142" name="publishers"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="publisher" null="0" autoincrement="0"><datatype>string</datatype></row><row name="abbreviation" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="234" y="64" name="publications"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="title" null="0" autoincrement="0"><datatype>text</datatype></row><row name="first_author" null="0" autoincrement="0"><datatype>string</datatype></row><row name="authors" null="0" autoincrement="0"><datatype>text</datatype></row><row name="id_collaborations" null="1" autoincrement="0"><datatype>integer</datatype><relation table="collaborations" row="id" /></row><row name="id_publishers" null="1" autoincrement="0"><datatype>integer</datatype><relation table="publishers" row="id" /></row><row name="year" null="0" autoincrement="0"><datatype>integer</datatype></row><row name="volume" null="1" autoincrement="0"><datatype>integer</datatype></row><row name="pages" null="1" autoincrement="0"><datatype>string</datatype></row><row name="submitted" null="1" autoincrement="0"><datatype>string</datatype></row><row name="preprint" null="1" autoincrement="0"><datatype>string</datatype></row><row name="publication_url" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_title" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_url" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_dates" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_town" null="1" autoincrement="0"><datatype>string</datatype></row><row name="id_countries" null="1" autoincrement="0"><datatype>integer</datatype><relation table="countries" row="id" /></row><row name="conference_speaker" null="1" autoincrement="0"><datatype>string</datatype></row><row name="report_numbers" null="1" autoincrement="0"><datatype>string</datatype></row><row name="id_reports" null="0" autoincrement="0"><datatype>integer</datatype><relation table="reports" row="id" /></row><row name="book_isbn" null="0" autoincrement="0"><datatype>string</datatype></row><row name="book_issn" null="0" autoincrement="0"><datatype>string</datatype></row><row name="book_chapters" null="0" autoincrement="0"><datatype>string</datatype></row><row name="authors_cppm" null="0" autoincrement="0"><datatype>text</datatype></row><row name="id_authors_roles" null="0" autoincrement="0"><datatype>integer</datatype><relation table="authors_roles" row="id" /></row><row name="id_teams" null="1" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="1" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="id_categories" null="1" autoincrement="0"><datatype>integer</datatype><relation table="categories" row="id" /></row><row name="id_status" null="0" autoincrement="0"><datatype>integer</datatype><relation table="status" row="id" /></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="77" y="350" name="countries"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="country" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="433" y="282" name="teams"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="team" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="432" y="373" name="projects"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="project" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="434" y="628" name="categories"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="418" y="158" name="collaborations"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="collaboration" null="0" autoincrement="0"><datatype>string</datatype></row><row name="cppm_flag" null="0" autoincrement="0"><datatype>boolean</datatype><default>False</default></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="90" y="452" name="reports"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="type" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="434" y="493" name="status"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="611" y="63" name="diplomas"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="title" null="0" autoincrement="0"><datatype>text</datatype></row><row name="author" null="0" autoincrement="0"><datatype>string</datatype></row><row name="universities" null="0" autoincrement="0"><datatype>string</datatype></row><row name="directors" null="0" autoincrement="0"><datatype>string</datatype></row><row name="defense" null="0" autoincrement="0"><datatype>string</datatype></row><row name="id_degrees" null="0" autoincrement="0"><datatype>integer</datatype><relation table="degrees" row="id" /></row><row name="url" null="0" autoincrement="0"><datatype>string</datatype></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="0" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="id_status" null="0" autoincrement="0"><datatype>integer</datatype><relation table="status" row="id" /></row><row name="year" null="0" autoincrement="0"><datatype>integer</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="782" y="249" name="degrees"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="degree" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="613" y="436" name="harvesters"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="controller" null="0" autoincrement="0"><datatype>string</datatype></row><row name="host" null="0" autoincrement="0"><datatype>string</datatype></row><row name="collections" null="0" autoincrement="0"><datatype>string</datatype></row><row name="ratio" null="0" autoincrement="0"><datatype>double</datatype></row><row name="id_categories" null="0" autoincrement="0"><datatype>integer</datatype><relation table="categories" row="id" /></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="45" y="589" name="authors_roles"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="role" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="787" y="346" name="cppm_authors"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="year" null="0" autoincrement="0"><datatype>integer</datatype></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="0" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="names" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table></sql>
\ No newline at end of file
</datatypes><table x="70" y="142" name="publishers"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="publisher" null="0" autoincrement="0"><datatype>string</datatype></row><row name="abbreviation" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="234" y="64" name="publications"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="title" null="0" autoincrement="0"><datatype>text</datatype></row><row name="first_author" null="0" autoincrement="0"><datatype>string</datatype></row><row name="authors" null="0" autoincrement="0"><datatype>text</datatype></row><row name="id_collaborations" null="1" autoincrement="0"><datatype>integer</datatype><relation table="collaborations" row="id" /></row><row name="id_publishers" null="1" autoincrement="0"><datatype>integer</datatype><relation table="publishers" row="id" /></row><row name="year" null="0" autoincrement="0"><datatype>integer</datatype></row><row name="volume" null="1" autoincrement="0"><datatype>integer</datatype></row><row name="pages" null="1" autoincrement="0"><datatype>string</datatype></row><row name="submitted" null="1" autoincrement="0"><datatype>string</datatype></row><row name="preprint" null="1" autoincrement="0"><datatype>string</datatype></row><row name="publication_url" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_title" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_url" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_dates" null="1" autoincrement="0"><datatype>string</datatype></row><row name="conference_town" null="1" autoincrement="0"><datatype>string</datatype></row><row name="id_countries" null="1" autoincrement="0"><datatype>integer</datatype><relation table="countries" row="id" /></row><row name="conference_speaker" null="1" autoincrement="0"><datatype>string</datatype></row><row name="report_numbers" null="1" autoincrement="0"><datatype>string</datatype></row><row name="id_reports" null="0" autoincrement="0"><datatype>integer</datatype><relation table="reports" row="id" /></row><row name="book_isbn" null="0" autoincrement="0"><datatype>string</datatype></row><row name="book_issn" null="0" autoincrement="0"><datatype>string</datatype></row><row name="book_chapters" null="0" autoincrement="0"><datatype>string</datatype></row><row name="authors_cppm" null="0" autoincrement="0"><datatype>text</datatype></row><row name="id_authors_roles" null="0" autoincrement="0"><datatype>integer</datatype><relation table="authors_roles" row="id" /></row><row name="id_teams" null="1" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="1" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="id_categories" null="1" autoincrement="0"><datatype>integer</datatype><relation table="categories" row="id" /></row><row name="id_status" null="0" autoincrement="0"><datatype>integer</datatype><relation table="status" row="id" /></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="77" y="350" name="countries"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="country" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="433" y="282" name="teams"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="team" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="432" y="373" name="projects"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="project" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="434" y="628" name="categories"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="418" y="158" name="collaborations"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="collaboration" null="0" autoincrement="0"><datatype>string</datatype></row><row name="cppm_flag" null="0" autoincrement="0"><datatype>boolean</datatype><default>False</default></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="90" y="452" name="reports"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="type" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="434" y="493" name="status"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="647" y="66" name="diplomas"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="title" null="0" autoincrement="0"><datatype>text</datatype></row><row name="author" null="0" autoincrement="0"><datatype>string</datatype></row><row name="universities" null="0" autoincrement="0"><datatype>string</datatype></row><row name="directors" null="0" autoincrement="0"><datatype>string</datatype></row><row name="defense" null="0" autoincrement="0"><datatype>string</datatype></row><row name="id_levels" null="0" autoincrement="0"><datatype>integer</datatype><relation table="levels" row="id" /></row><row name="url" null="0" autoincrement="0"><datatype>string</datatype></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="0" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="id_status" null="0" autoincrement="0"><datatype>integer</datatype><relation table="status" row="id" /></row><row name="year" null="0" autoincrement="0"><datatype>integer</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="795" y="247" name="levels"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="level" null="0" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="614" y="460" name="harvesters"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="controller" null="0" autoincrement="0"><datatype>string</datatype></row><row name="host" null="0" autoincrement="0"><datatype>string</datatype></row><row name="collections" null="0" autoincrement="0"><datatype>string</datatype></row><row name="ratio" null="0" autoincrement="0"><datatype>double</datatype></row><row name="id_categories" null="0" autoincrement="0"><datatype>integer</datatype><relation table="categories" row="id" /></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="45" y="589" name="authors_roles"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="role" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="787" y="346" name="cppm_authors"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="year" null="0" autoincrement="0"><datatype>integer</datatype></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="0" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="names" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table></sql>
\ No newline at end of file
......@@ -31,17 +31,17 @@
'Copyright': 'Copyright',
'Cotutelle': 'Cotutelle',
'Country': 'Pays',
'Cppm Flag': 'Cppm Flag',
'Cppm Flag': 'CPPM',
'Date': 'Date',
'Date of submission to a publisher: 13 Dec 2011': 'Date de soumission à un éditeur : 13 Dec 2011',
'Dates': 'Dates',
'Dates of the conference = 9 - 10 Oct 2012 or 29 Oct - 3 Nov 2012': 'Dates de la conférence : 9 - 10 Oct 2012 ou 29 Oct - 3 Nov 2012',
'Defense': 'Soutenance',
'Definition': 'Définition',
'Degree': 'Degré',
'Degree': 'Degree',
'Delete:': 'Delete:',
'Diploma': 'Diplome',
'Direct access to the table: ': 'Direct access to the table: ',
'Direct access to the table: ': 'Accès direct à la table : ',
'Directors': 'Directeurs',
'Filter cppm_authors': 'Filtrer les auteurs du CPPM',
'Filter diplomas': 'Filtrer les diplomes',
......@@ -55,6 +55,7 @@
'ISSN': 'ISSN',
'Id': 'Id',
'Import/Export': 'Importer/Exporter',
'Level': 'Niveau',
'List': 'Liste',
'List of authors separated by comma: J. Doe, P.-Y. Smith': 'Liste des auteurs séparé par une virgule : J. Doe, P.-Y. Smith',
'List of collections separated by commma: LHCb Papers, LHCb Talks': 'Liste des collections separé par une virgule : LHCb Papers, LHCb Talks',
......@@ -126,7 +127,6 @@
'cppm_authors': 'autheurs du cppm',
'database %s select': 'database %s select',
'db': 'db',
'degrees': 'degrés',
'design': 'design',
'diplomas': 'diplomes',
'enter a number between %(min)g and %(max)g': 'enter a number between %(min)g and %(max)g',
......@@ -136,6 +136,7 @@
'harvesters': 'moissonneurs',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'levels': 'niveaux',
'lists': 'listes',
'marc12': 'marc12',
'metrics': 'métriques',
......@@ -150,7 +151,7 @@
'select diplomas for the project': 'sélectionnez les diplomes pour le project',
'select diplomas for the team': "sélectionnez les diplomes pour l'équipe",
'select diplomas for the year': "sélectionnez les diplomes pour l'année",
'select diplomas with the degree': 'sélectionnez les diplomes avec le degré',
'select diplomas with the level': 'sélectionnez les diplomes pour le niveau',
'select diplomas with the status': 'sélectionnez les diplomes avec le status',
'select publication for the year': "sélectionnez les publications pour l'année",
'select publication where report number(s) contains': 'sélectionnez les publications pour lesquelles le numéro de rapport(s) contient',
......
......@@ -47,8 +47,9 @@ year = datetime.now().year
# connection to the database
#
#-------------------------------------------------------------------------------
db = DAL('sqlite://storage.sqlite', migrate=True)
#db = DAL('mysql://GesProd:Prod_CPPM@maretude.in2p3.fr/GesProd', migrate=True)
#db = DAL('sqlite://storage.sqlite', migrate=True)
db = DAL('mysql://GesProd:Prod_CPPM@maretude.in2p3.fr/GesProd', migrate=True,
pool_size=5)
#-------------------------------------------------------------------------------
#
......@@ -77,9 +78,9 @@ db.define_table("countries",
Field("country", "string", notnull=True, unique=True),
migrate="countries.table")
db.define_table("degrees",
Field("degree", "string", notnull=True, unique=True),
migrate="degrees.table")
db.define_table("levels",
Field("level", "string", notnull=True, unique=True),
migrate="levels.table")
db.define_table("projects",
Field("project", "string", notnull=True, unique=True),
......@@ -286,7 +287,7 @@ db.define_table("diplomas",
Field("universities", "string", notnull=True, comment=tp_universities),
Field("directors", "string", comment=tp_directors),
Field("defense", "string", notnull=True, comment=tp_defense),
Field("id_degrees", db.degrees, default=undef_id, label='Degree'),
Field("id_levels", db.levels, default=undef_id, label='Degree'),
Field("url", "string", requires=IS_EMPTY_OR(IS_URL())),
Field("id_teams", db.teams, default=undef_id, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Projects'),
......@@ -294,8 +295,8 @@ db.define_table("diplomas",
Field("year", "integer", notnull=True, default=year),
migrate="diplomas.table")
db.diplomas.id_degrees.requires = \
IS_IN_DB(db, 'degrees.id', 'degrees.degree')
db.diplomas.id_levels.requires = \
IS_IN_DB(db, 'levels.id', 'levels.level')
db.diplomas.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
......
......@@ -16,8 +16,8 @@ if not db(db.collaborations.id).count():
if not db(db.countries.id).count():
db.countries.insert(id=undef_id, country=undef)
if not db(db.degrees.id).count():
db.degrees.insert(id=undef_id, degree=undef)
if not db(db.levels.id).count():
db.levels.insert(id=undef_id, level=undef)
if not db(db.projects.id).count():
db.projects.insert(id=undef_id, project=undef)
......
......@@ -85,6 +85,10 @@ if db(db.categories.id).count() == 1:
definition="Article soumis à un éditeur "
"mais pas encore publié (preprint)")
# LHCb team
if db(db.teams.id).count() == 1:
db.teams.insert(id=2, team='LHCb')
# cppm authors
if db(db.cppm_authors.id).count() == 0:
db.cppm_authors.insert(id=1, year=1998, id_teams=2, id_projects=1, authors="E. Aslanides, B. Dinkespiler, R. Le Gac, M. Menouni, A. Tsaregorodtsev")
......@@ -150,10 +154,6 @@ if db(db.harvesters.id).count() == 0:
id_categories=1)
if db(db.teams.id).count() == 1:
db.teams.insert(id=2, team='LHCb')
if db(db.status.id).count() == 1:
db.status.insert(id=2, code=dbui.UNKNOWN,
definition="Un champ important n'est pas défini. A vérifier.")
......
......@@ -269,7 +269,7 @@ gridModifier.hide_columns('directors',
'url')
filters = [('year', '==', T('select diplomas for the year')),
('id_degrees', '==', T('select diplomas with the degree')),
('id_levels', '==', T('select diplomas with the level')),
('id_teams', '==', T('select diplomas for the team')),
('id_projects', '==', T('select diplomas for the project')),
('id_status', '==', T('select diplomas with the status'))]
......@@ -296,8 +296,8 @@ if session.role != 'admin':
'collaborations',
'countries',
'cppm_authors',
'degrees',
'harvesters',
'levels',
'projects',
'publishers',
'reports',
......
......@@ -909,7 +909,7 @@ class Thesis(PublicationsTool):
# alias
defense_date = record.these_defense()
first_author = record.first_author()
id_degree = get_create_id(db, 'degrees', degree=record.these_degree())
id_level = get_create_id(db, 'levels', level=record.these_level())
title = record.title()
universities = fix_amu(record)
year = record.year()
......@@ -926,7 +926,7 @@ class Thesis(PublicationsTool):
# eventually insert a new thesis
db.diplomas.insert(author=first_author,
id_degrees=id_degree,
id_levels=id_level,
id_teams=self.id_team,
id_status=plugin_dbui.UNDEF_ID,
defense=defense_date,
......
......@@ -894,7 +894,7 @@ class Record(dict):
return val
def these_degree(self):
def these_level(self):
return self._get(502, 'a')
......
......@@ -178,7 +178,7 @@ class Diplomas(ListTool):
db = self.db
# publication list query resolving foreign key
query = db.diplomas.id_degrees == db.degrees.id
query = db.diplomas.id_levels == db.levels.id
# add list selector constraints
if self.id_project and int(self.id_project) != 1:
......
......@@ -2,6 +2,8 @@
HEAD
- Rename the table degrees as levels in order to run with MySQL.
0.2.1 (Jun 2012)
- Minor release
- ToolTip for all type of form
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment