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
fc67ba82
Commit
fc67ba82
authored
Oct 13, 2015
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Node deletion, fix.
parent
3042e0de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
views.py
gargantext_web/views.py
+5
-7
No files found.
gargantext_web/views.py
View file @
fc67ba82
...
...
@@ -434,7 +434,7 @@ def move_to_trash(node_id):
else
:
empty_trash
(
"corpus_id"
)
return
(
previous_type_id
)
#
return(previous_type_id)
except
Exception
as
error
:
print
(
"can not move to trash Node"
+
str
(
node_id
)
+
":"
+
str
(
error
))
...
...
@@ -471,18 +471,16 @@ def delete_node(request, node_id):
if
node
.
user_id
!=
user
.
id
:
return
HttpResponseForbidden
()
previous_type_id
=
move_to_trash
(
node_id
)
previous_type_id
=
node
.
type_id
node_parent_id
=
node
.
parent_id
move_to_trash
(
node_id
)
if
previous_type_id
==
cache
.
NodeType
[
'Corpus'
]
.
id
:
return
HttpResponseRedirect
(
'/project/'
+
str
(
node
.
parent_id
))
return
HttpResponseRedirect
(
'/project/'
+
str
(
node
_
parent_id
))
else
:
return
HttpResponseRedirect
(
'/projects/'
)
if
settings
.
DEBUG
==
True
:
empty_trash
()
def
delete_corpus
(
request
,
project_id
,
node_id
):
# ORM Django
with
transaction
.
atomic
():
...
...
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