Fixed problem with invitations deletion in timeline implementation
parent
b8f7a53a81
commit
2207b7ff5a
|
@ -91,10 +91,22 @@ def membership_create_timeline(instance, extra_data={}):
|
||||||
|
|
||||||
@register_timeline_implementation("projects.membership", "delete")
|
@register_timeline_implementation("projects.membership", "delete")
|
||||||
def membership_delete_timeline(instance, extra_data={}):
|
def membership_delete_timeline(instance, extra_data={}):
|
||||||
|
if instance.user:
|
||||||
|
return {
|
||||||
|
"user": {
|
||||||
|
"id": instance.user.pk,
|
||||||
|
"name": instance.user.get_full_name(),
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"id": instance.project.pk,
|
||||||
|
"slug": instance.project.slug,
|
||||||
|
"name": instance.project.name,
|
||||||
|
},
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
"user": {
|
"invitation": {
|
||||||
"id": instance.user.pk,
|
"id": instance.pk,
|
||||||
"name": instance.user.get_full_name(),
|
"email": instance.email,
|
||||||
},
|
},
|
||||||
"project": {
|
"project": {
|
||||||
"id": instance.project.pk,
|
"id": instance.project.pk,
|
||||||
|
|
Loading…
Reference in New Issue