-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1051 backend model changes on cosmos to hold new incoming urls #1069
1051 backend model changes on cosmos to hold new incoming urls #1069
Conversation
…new-incoming-urls Merging dev into this branch
for more information, see https://pre-commit.ci
dump_urls = DumpUrl.objects.filter(collection=collection) | ||
curated_urls = CuratedUrl.objects.filter(collection=collection) | ||
|
||
DeltaUrl.objects.filter(collection=collection).delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want this to happen at the end?
delete=False, | ||
) | ||
elif ( | ||
curated_url.scraped_title != dump_url.scraped_title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might need to only write the different metadata, not all of it
sde_collections/tasks.py
Outdated
) | ||
|
||
|
||
def populate_dump_urls(collection): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might move this up in the file?
sde_collections/tasks.py
Outdated
|
||
|
||
def populate_dump_urls(collection): | ||
urls = Url.objects.filter(collection=collection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an abstract model, it should have nothing stored in it
@@ -49,7 +52,7 @@ def _get_data_to_import(collection, server_name): | |||
continue | |||
|
|||
augmented_data = { | |||
"model": "sde_collections.candidateurl", | |||
"model": "sde_collections.url", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bishwas tried to make this dump directly into dump url, but that didn't work. need to troubleshoot.
…ng-urls' of github.com:NASA-IMPACT/COSMOS into 1051-backend-model-changes-on-cosmos-to-hold-new-incoming-urls
for more information, see https://pre-commit.ci
…ng-urls' of github.com:NASA-IMPACT/COSMOS into 1051-backend-model-changes-on-cosmos-to-hold-new-incoming-urls
for more information, see https://pre-commit.ci
"candidate-urls-api/<str:config_folder>/", | ||
view=views.CandidateURLAPIView.as_view(), | ||
name="candidate-url-api", | ||
"curated-urls-api/<str:config_folder>/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to keep the old one and add a new one alongside
@@ -307,8 +308,8 @@ def create(self, request, *args, **kwargs): | |||
return Response(serializer.data, status=status.HTTP_201_CREATED) | |||
|
|||
|
|||
class CandidateURLAPIView(ListAPIView): | |||
serializer_class = CandidateURLAPISerializer | |||
class CuratedURLAPIView(ListAPIView): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the old one and add a new one alongside
…new-incoming-urls
No description provided.