mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-07 15:45:59 +00:00
Merge pull request #582 from eikek/delete-org-fix
Fix deleting organization
This commit is contained in:
commit
38e0a50942
@ -197,8 +197,9 @@ object QOrganization {
|
|||||||
for {
|
for {
|
||||||
n0 <- RItem.removeCorrOrg(collective, orgId)
|
n0 <- RItem.removeCorrOrg(collective, orgId)
|
||||||
n1 <- RContact.deleteOrg(orgId)
|
n1 <- RContact.deleteOrg(orgId)
|
||||||
n2 <- ROrganization.delete(orgId, collective)
|
n2 <- RPerson.removeOrg(orgId)
|
||||||
} yield n0 + n1 + n2
|
n3 <- ROrganization.delete(orgId, collective)
|
||||||
|
} yield n0 + n1 + n2 + n3
|
||||||
|
|
||||||
def deletePerson(personId: Ident, collective: Ident): ConnectionIO[Int] =
|
def deletePerson(personId: Ident, collective: Ident): ConnectionIO[Int] =
|
||||||
for {
|
for {
|
||||||
|
@ -178,4 +178,7 @@ object RPerson {
|
|||||||
case None =>
|
case None =>
|
||||||
Sync[ConnectionIO].pure(Vector.empty)
|
Sync[ConnectionIO].pure(Vector.empty)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def removeOrg(orgId: Ident): ConnectionIO[Int] =
|
||||||
|
DML.update(T, T.oid === orgId, DML.set(T.oid.setTo(None)))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user