Skip to content

Commit

Permalink
chore: Update and align error message (#5319)
Browse files Browse the repository at this point in the history
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->



**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->

- Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->

**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->

- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
  • Loading branch information
frascuchon authored Jul 29, 2024
1 parent 8ac8d85 commit 3b91292
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions argilla-frontend/translation/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ export default {
missing_vector: {
message: "Vektor nicht im ausgewählten Datensatz gefunden",
},
update_distribution_with_existing_responses: {
message:
"Die Verteilungseinstellungen können für einen Datensatz mit Benutzerantworten nicht geändert werden",
},
},
http: {
401: {
Expand Down
2 changes: 1 addition & 1 deletion argilla-frontend/translation/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default {
},
update_distribution_with_existing_responses: {
message:
"This dataset has responses. Task distribution settings cannot be modified",
"Distribution settings can't be modified for a dataset containing user responses",
},
},
http: {
Expand Down
2 changes: 1 addition & 1 deletion argilla-server/src/argilla_server/validators/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ async def validate(cls, db: AsyncSession, dataset: Dataset, dataset_attrs: dict)
async def _validate_distribution(cls, dataset: Dataset, dataset_attrs: dict) -> None:
if dataset_attrs.get("distribution") is not None and (await dataset.responses_count) > 0:
raise UpdateDistributionWithExistingResponsesError(
"Distribution settings cannot be modified for a dataset with records including responses"
"Distribution settings can't be modified for a dataset containing user responses"
)
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def test_update_dataset_distribution_for_dataset_with_responses(

assert response.json() == {
"code": "update_distribution_with_existing_responses",
"message": "Distribution settings cannot be modified for a dataset with records including responses",
"message": "Distribution settings can't be modified for a dataset containing user responses",
}

async def test_update_dataset_distribution_with_invalid_strategy(
Expand Down

0 comments on commit 3b91292

Please sign in to comment.