Skip to content
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

Add dataservice transfer #3237

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Add a test to clear datasets on Topics api v1 [#3233](https://github.com/opendatateam/udata/pull/3233)
- feat: optimize topic's datasets reindex [#3234](https://github.com/opendatateam/udata/pull/3234)
- Allow Dataservice transfer [#3237](https://github.com/opendatateam/udata/pull/3237)

## 10.0.6 (2024-12-19)

Expand Down
6 changes: 2 additions & 4 deletions udata/core/dataservices/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ def __str__(self):
return self.title or ""

title = field(
db.StringField(required=True),
example="My awesome API",
sortable=True,
db.StringField(required=True), example="My awesome API", sortable=True, show_as_ref=True
)
acronym = field(
db.StringField(max_length=128),
Expand Down Expand Up @@ -214,7 +212,7 @@ def url_for(self, *args, **kwargs):
def self_api_url(self):
return endpoint_for("api.dataservice", dataservice=self, _external=True)

@function_field(description="Link to the udata web page for this dataservice")
@function_field(description="Link to the udata web page for this dataservice", show_as_ref=True)
def self_web_url(self):
return endpoint_for("dataservices.show", dataservice=self, _external=True)

Expand Down
2 changes: 2 additions & 0 deletions udata/features/transfer/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from flask import request

from udata.api import API, api, base_reference, fields
from udata.core.dataservices.models import Dataservice
from udata.core.dataset.api_fields import dataset_ref_fields
from udata.core.organization.api_fields import org_ref_fields
from udata.core.user.api_fields import user_ref_fields
Expand Down Expand Up @@ -49,6 +50,7 @@
}

subject_mapping = {
Dataservice: Dataservice.__ref_fields__,
Dataset: dataset_ref_fields,
Reuse: Reuse.__ref_fields__,
}
Expand Down