Skip to content
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

Change: when forking a query, copy all visualizations #1256

Merged
merged 8 commits into from
Nov 23, 2016

Conversation

ninneko
Copy link
Contributor

@ninneko ninneko commented Aug 25, 2016

Closes #439.

@@ -715,6 +715,32 @@ def recent(cls, groups, user_id=None, limit=20):

return query

@classmethod
def fork(cls, id, user, org):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why class method and not an instance method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that fork logic (fetch query and chart data by query id, then change their name and id, then insert them) should be model's method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway the fork method shouldn't fetch the query. It will either operate on itself (if it's an instance method) or on a given query (if we keep it as a class method).

What benefit we have from having this as a class method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, change instance methdo

@arikfr arikfr changed the title Feature: When forking a query, charts are copied Change: when forking a query, copy all visualizations Aug 28, 2016
@arikfr
Copy link
Member

arikfr commented Sep 13, 2016

@ninneko have you seen my comments?

@ninneko
Copy link
Contributor Author

ninneko commented Sep 15, 2016

Sorry, I was not able to commit because I have been sick.
I will commit this PR until tomorrow.

@arikfr
Copy link
Member

arikfr commented Sep 15, 2016

Sorry to hear that. I hope you're feeling better now!

No pressure with the pull request. Just wanted to make sure you noticed the
comments.

Thanks.

On Sep 15, 2016 11:01 AM, "yohei.naruse" notifications@github.com wrote:

Sorry, I was not able to commit because I have been sick.
I will commit this PR until tomorrow.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1256 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEXLC7EBbFvRo1QaCPYM8tAeOAW_XQkks5qqPtxgaJpZM4Js94c
.

@arikfr
Copy link
Member

arikfr commented Nov 9, 2016

@ninneko you need to update the tests, because they still use the class method instead of instance method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants