Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MCC APSIS
NACSOS
NACSOS Core
Commits
17036ccb
Commit
17036ccb
authored
1 year ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
add special lexis getter
parent
2931ae3b
No related branches found
No related tags found
1 merge request
!61
Master
Pipeline
#2170
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/api/routes/project/items.py
+6
-5
6 additions, 5 deletions
server/api/routes/project/items.py
with
6 additions
and
5 deletions
server/api/routes/project/items.py
+
6
−
5
View file @
17036ccb
from
fastapi
import
APIRouter
,
Depends
,
HTTPException
,
status
,
Query
from
nacsos_data.db.schemas
import
Project
,
ItemTypeLiteral
,
GenericItem
,
AcademicItem
,
ItemType
,
Item
,
LexisNexisItem
from
nacsos_data.db.crud.items.lexis_nexis
import
read_lexis_paged_for_project
from
nacsos_data.db.schemas
import
Project
,
ItemTypeLiteral
,
GenericItem
,
AcademicItem
,
ItemType
,
Item
,
LexisNexisItem
,
\
LexisNexisItemSource
from
nacsos_data.models.items
import
AnyItemModel
,
GenericItemModel
,
AcademicItemModel
,
AnyItemModelList
,
\
LexisNexisItemModel
...
...
@@ -14,7 +16,7 @@ from nacsos_data.db.crud.items.twitter import \
read_all_twitter_items_for_project_paged
,
\
read_twitter_item_by_item_id
,
\
import_tweet
from
sqlalchemy
import
select
from
sqlalchemy
import
select
,
func
from
server.api.errors
import
ItemNotFoundError
from
server.data
import
db_engine
...
...
@@ -59,9 +61,8 @@ async def list_project_data_paged(item_type: ItemTypeLiteral, page: int, page_si
page
=
page
,
page_size
=
page_size
,
project_id
=
project_id
,
engine
=
db_engine
)
if
item_type
==
'
lexis
'
:
return
await
read_paged_for_project
(
Model
=
LexisNexisItemModel
,
Schema
=
LexisNexisItem
,
page
=
page
,
page_size
=
page_size
,
project_id
=
project_id
,
engine
=
db_engine
)
return
await
read_lexis_paged_for_project
(
page
=
page
,
page_size
=
page_size
,
project_id
=
project_id
,
db_engine
=
db_engine
)
if
item_type
==
'
twitter
'
:
return
await
read_all_twitter_items_for_project_paged
(
project_id
=
project_id
,
page
=
page
,
page_size
=
page_size
,
engine
=
db_engine
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment