-
Notifications
You must be signed in to change notification settings - Fork 91
feat: add topic element activities #3439
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
Changes from 5 commits
24a6b7e
e855dd8
b759681
fafa011
8398bd6
dd7878d
bbf54c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,16 +130,13 @@ def post(self, topic): | |
| else: | ||
| element = TopicElement() | ||
| form.populate_obj(element) | ||
| element.topic = topic | ||
| element.save() | ||
| elements.append(element) | ||
|
|
||
| if errors: | ||
| apiv2.abort(400, errors=errors) | ||
|
|
||
| for element in elements: | ||
| element.topic = topic | ||
| element.save() | ||
|
|
||
| topic.save() | ||
|
|
||
| return topic, 201 | ||
|
|
@@ -157,6 +154,7 @@ def delete(self, topic): | |
| if not TopicEditPermission(topic).can(): | ||
| apiv2.abort(403, "Forbidden") | ||
|
|
||
| # TODO: should we ignore activity creation here? | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will create a lot of deleted activities (and probably crash since it is synchronous) if we empty a universe Topic. I'm not sure we should introduce an exception here to prevent that, WDYT? Emptying a universe crashes anyway 😬 #3423
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm... I think it can be dealt at the same time as #3423 indeed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed the TODO wording. |
||
| topic.elements.delete() | ||
|
|
||
| return None, 204 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.