Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
bc355062
Commit
bc355062
authored
Sep 07, 2015
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Init.by hyperdata creation.
parent
dde756c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
init.py
init.py
+3
-5
No files found.
init.py
View file @
bc355062
...
...
@@ -8,7 +8,7 @@ from admin.utils import PrintException
##from node import models
#
## SQLA models
from
gargantext_web.db
import
*
from
gargantext_web.db
import
session
################################################################################
## If you need to reset all data
...
...
@@ -33,17 +33,15 @@ hyperdata = {
}
for
name_
,
type_
in
hyperdata
.
items
():
data
=
(
session
.
query
(
Hyperdata
)
.
filter
(
data
_
=
(
session
.
query
(
Hyperdata
)
.
filter
(
Hyperdata
.
name
==
str
(
name_
),
Hyperdata
.
type
==
str
(
type_
)
)
.
first
()
)
if
data
is
None
:
if
data_
is
None
:
print
(
'Hyper Data'
+
name_
+
'does not existe, creating it'
)
hyperdata
=
Hyperdata
(
name
=
name_
,
type
=
type_
)
session
.
add
(
hyperdata
)
session
.
commit
()
...
...
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