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
149
Issues
149
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
f46a1ba7
Commit
f46a1ba7
authored
Nov 21, 2024
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unsound DefaultFromField (Maybe NodeNodeCategory) instance
parent
a495afdd
Pipeline
#7023
failed with stages
in 51 minutes and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Update.hs
src/Gargantext/Database/Query/Table/Node/Update.hs
+2
-1
NodeNode.hs
src/Gargantext/Database/Schema/NodeNode.hs
+1
-1
No files found.
src/Gargantext/Database/Query/Table/Node/Update.hs
View file @
f46a1ba7
...
...
@@ -73,7 +73,8 @@ update loggedInUserId (Move sourceId targetId) = do
->
-- both are not read-only, normal move
move_db_update
sourceId
targetId
(
False
,
True
)
->
(
:
[]
)
<$>
publish_node
(
SourceId
sourceId
)
(
TargetId
targetId
)
NPP_publish_no_edits_allowed
->
do
void
$
publish_node
(
SourceId
sourceId
)
(
TargetId
targetId
)
NPP_publish_no_edits_allowed
move_db_update
sourceId
targetId
(
True
,
False
)
->
-- the source is read only. If we are the owner we allow unpublishing.
-- FIXME(adn) is this check enough?
...
...
src/Gargantext/Database/Schema/NodeNode.hs
View file @
f46a1ba7
...
...
@@ -76,7 +76,7 @@ instance HasDBid NodeNodeCategory where
NNC_publish
<$>
lookupDBid
x
instance
DefaultFromField
SqlInt4
(
Maybe
NodeNodeCategory
)
where
defaultFromField
=
lookupDBid
<$>
fromPGSFromField
defaultFromField
=
(
lookupDBid
=<<
)
<$>
fromPGSFromField
type
NodeNode
=
NodeNodePoly
NodeId
NodeId
(
Maybe
Double
)
(
Maybe
NodeNodeCategory
)
...
...
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