-
Notifications
You must be signed in to change notification settings - Fork 999
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
Fix issue with generating slug for sharing #18986
base: dev
Are you sure you want to change the base?
Fix issue with generating slug for sharing #18986
Conversation
Should I add |
Can you please also modify |
Should I add a requirement into one of the |
Sorry, forgot about that! You should add |
Thank you for the explanation! I’d love to know more. |
Some info is in this presentation, slides 65-72: Ping me on Matrix if you need clarifications. |
The test failures seems to be irrelevant. |
history_name = "تاریخچه" | ||
history_id = self.dataset_populator.new_history(name=history_name) | ||
response = self.dataset_populator.make_public(history_id) | ||
assert response["username_and_slug"] |
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.
Can you assert the actual slug?
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.
The SharingStatus
model doesn't have the slug itself.
Should I split it from this one?
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.
like this:
assert response["username_and_slug"] | |
assert response["username_and_slug"].split("h/")[1] == history_name |
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.
You can also assert that the history_name is in response["username_and_slug"], whatever you prefer
This pull request fixes an issue with generating a slug for sharing. The commit includes a patch that adds a check to ensure that the slug base is not empty, and if it is, it sets it to "unnamed". This resolves the problem with generating slugs for sharing and publishing when it is not alphanumeric. related to #18584
How to test the changes?
(Select all options that apply)
License