-
Notifications
You must be signed in to change notification settings - Fork 41
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
Feature interaction: project duplicate + swimlanes #169
Comments
@psybers Thanks for the detailed explaination: @PSzczepanski1996 already opened a PR fixing this, but I'd love to have a test covering this case. @yakky what do you think? |
@psybers Actually, I don't have a running Taiga + Python Taiga instance to see what kind of response a |
That's fine, I'm little busy with work at my workplace so if you can write test - just do that. |
@protoroto according to the API docs (https://docs.taiga.io/api.html#projects-duplicate) it just returns a project detail object: |
@psybers @PSzczepanski1996 Sorry for the delay, sadly I didn't had much time to work on this. I'll try next week to write a test and add it to @PSzczepanski1996 pr |
More observation: This issue doesn't appear to be limited to projects created from duplicate(). If a project has never had a swimlane created, the api.projects.get_by_slug() function crashes when it tries to enumerate swimlanes. The parse() function in base.py was failing because there are no swimlanes to enumerate. In my case, the Kanban module had not been enabled, so swimlane functionality wasn't even visible. The get_by_slug() function succeeds after enabling the Kanban module in a project, manually creating a swimlane, then disabling the Kanban module. |
hello, what is the status on this? I'm experiencing the same errors. |
Have issue with For those who keep getting |
Description
It appears there is a bit of a feature interaction between the ability to duplicate a project (#161) and the new swimlanes support (#162). The issue is that when duplicating a project, Taiga (apparently) returns a
swimlanes
parameter with no value. So Python sets the value toNone
and then attempts to call parse with that value. This results in the following crash:The problem is in
base.py
on line 107:python-taiga/taiga/models/base.py
Line 107 in dce5ae0
Here,
entries
winds up beingNone
. I believe this is really a shortcoming of the Taiga API response. It should either not sendswimlanes
in the response or it should send it with an empty list. At any rate, I would recommend placing anif entries:
before this line to avoid problems such as this. In this case, it would simply wind up with an empty swimlanes attribute, which is correct.Steps to reproduce
Call
duplicate()
on a project:Versions
python-taiga: 1.3.0
Expected behaviour
No crash. The project duplicates and returns a proper
Project
object.Actual behaviour
Crashes. Though the project is duplicated on Taiga's side.
The text was updated successfully, but these errors were encountered: