Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
77283dfc
Commit
77283dfc
authored
Dec 04, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FLOW] default master CorpusId fix.
parent
53633abe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+1
-1
Flow.hs
src/Gargantext/Database/Flow.hs
+10
-9
No files found.
src/Gargantext/API/Ngrams.hs
View file @
77283dfc
...
...
@@ -301,7 +301,7 @@ getTableNgrams c cId maybeTabType maybeListId = do
(
ngramsTableDatas
,
mapToParent
,
mapToChildren
)
<-
Ngrams
.
getNgramsTableDb
c
NodeDocument
ngramsType
(
Ngrams
.
NgramsTableParam
listId
cId
)
printDebug
"ngramsTableDatas"
ngramsTableDatas
--
printDebug "ngramsTableDatas" ngramsTableDatas
pure
$
NgramsTable
$
map
(
\
(
Ngrams
.
NgramsTableData
ngs
_
lt
w
)
->
NgramsElement
ngs
...
...
src/Gargantext/Database/Flow.hs
View file @
77283dfc
...
...
@@ -28,7 +28,7 @@ import Gargantext.Core.Types (NodePoly(..), ListType(..), listTypeId)
import
Gargantext.Database.Bashql
(
runCmd'
)
-- , del)
import
Gargantext.Database.Config
(
userMaster
,
userArbitrary
,
corpusMasterName
)
import
Gargantext.Database.Ngrams
(
insertNgrams
,
Ngrams
(
..
),
NgramsT
(
..
),
NgramsIndexed
(
..
),
indexNgramsT
,
NgramsType
(
..
),
text2ngrams
)
import
Gargantext.Database.Node
(
mkRoot
,
mkCorpus
,
Cmd
(
..
),
mkList
,
mkGraph
,
mkDashboard
,
mkAnnuaire
)
--
, getCorporaWithParentId')
import
Gargantext.Database.Node
(
mkRoot
,
mkCorpus
,
Cmd
(
..
),
mkList
,
mkGraph
,
mkDashboard
,
mkAnnuaire
,
getCorporaWithParentId'
)
import
Gargantext.Database.Root
(
getRootCmd
)
import
Gargantext.Database.Types.Node
(
NodeType
(
..
),
NodeId
)
import
Gargantext.Database.Node.Document.Add
(
add
)
...
...
@@ -146,17 +146,18 @@ subFlowCorpus username cName = do
True
->
panic
"Error: more than 1 userNode / user"
False
->
pure
rootId'
let
rootId
=
maybe
(
panic
"error rootId"
)
identity
(
head
rootId''
)
{-
--
{-
corpusId''
<-
if
username
==
userMaster
then runCmd' $ getCorporaWithParentId' rootId
else pure []
then
do
ns
<-
runCmd'
$
getCorporaWithParentId'
rootId
pure
$
map
_node_id
ns
else
pure
[]
let corpusId''' = case map _node_id <$> head corpusId'' of
Nothing ->
-- panic "error" -- pure Nothing
-- else (view node_id <$> head <$> runCmd' $ getCorporaWithParentId' rootId)
--}
corpusId'
<-
runCmd'
$
mkCorpus
(
Just
cName
)
Nothing
rootId
userId
corpusId'
<-
if
corpusId''
/=
[]
then
pure
corpusId''
else
runCmd'
$
mkCorpus
(
Just
cName
)
Nothing
rootId
userId
let
corpusId
=
maybe
(
panic
"error corpusId"
)
identity
(
head
corpusId'
)
...
...
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