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
ccaeea62
Commit
ccaeea62
authored
Dec 13, 2014
by
Mathieu Rodic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEBUG] Corrected bug on /api/nodes/{id}/children/queries
parent
83c83f78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
.gitignore
.gitignore
+2
-0
api.py
gargantext_web/api.py
+6
-2
No files found.
.gitignore
View file @
ccaeea62
__pycache__/
parsing/Taggers/treetagger/
.ipynb_checkpoints/
data_samples
VENV
gargantext_web/api.py
View file @
ccaeea62
...
...
@@ -368,7 +368,9 @@ class NodesChildrenQueries(APIView):
else
:
field
=
getattr
(
Node
,
field_name
)
fields_list
.
append
(
field
.
label
(
field_name
)
field
.
label
(
field_name
if
'.'
in
field_name
else
'node.'
+
field_name
)
)
# starting the query!
...
...
@@ -432,7 +434,9 @@ class NodesChildrenQueries(APIView):
for
field_name
in
fields_names
:
if
field_name
not
in
authorized_aggregates
:
# query = query.group_by(text(field_name))
query
=
query
.
group_by
(
'"
%
s"'
%
(
field_name
,
))
query
=
query
.
group_by
(
'"
%
s"'
%
(
field_name
if
'.'
in
field_name
else
'node.'
+
field_name
,
))
# sorting
sort_fields_names
=
request
.
DATA
.
get
(
'sort'
,
[
'id'
])
...
...
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