Skip to content

Conversation

954-Ivory
Copy link
Contributor

@954-Ivory 954-Ivory commented Oct 24, 2022

Issue: #8726

@954-Ivory
Copy link
Contributor Author

Some developer will use custom Manager create from BaseManager.
We need to check whether data is a BaseManager instance.

@kevin-brown
Copy link
Contributor

Shouldn't this only need to check the BaseManager type, since Manager also derives from it?

@954-Ivory
Copy link
Contributor Author

954-Ivory commented Oct 25, 2022

Shouldn't this only need to check the BaseManager type, since Manager also derives from it?

Yes, I forgot this.

@auvipy auvipy self-requested a review November 21, 2022 13:54
# Dealing with nested relationships, data can be a Manager,
# so, first get a queryset from the Manager if needed
iterable = data.all() if isinstance(data, models.Manager) else data
iterable = data.all() if isinstance(data, models.manager.BaseManager) else data
Copy link
Collaborator

Choose a reason for hiding this comment

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

I triggered the CI, can you please pull from main branch again? the bug was not verify able in the test suite, would you mind investigate further to figure out if we can add some relevant test for this?

Copy link
Contributor Author

@954-Ivory 954-Ivory Nov 21, 2022

Choose a reason for hiding this comment

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

I triggered the CI, can you please pull from main branch again? the bug was not verify able in the test suite, would you mind investigate further to figure out if we can add some relevant test for this?

Yes, but it may take a while.
I'm a little hungry. I'm going to cook dinner first. 😋


Is that what you mean? ( My English is not good )

  1. Append the test case.
  2. Merge this branch to master in my fork ( I'm not sure about this ).
  3. Then pull request again (encode:master from 954-ivory:master).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant pull from encode:master to your working branch for this PR 954-ivory:master so that the recently updated versions in CI could reflect here. And some unit tests :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks for the rebase, now just appending/adding additional test cases would be really great

@954-Ivory 954-Ivory requested a review from auvipy November 21, 2022 14:01
@auvipy auvipy added the Bug label Nov 21, 2022
@auvipy
Copy link
Collaborator

auvipy commented Nov 22, 2022

there are some issues with pre commit, can you check and fix them? you might need to run flake8 locally

Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

to fix nose deprecation warning

Copy link
Collaborator

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

this part was creating precommit problems

@auvipy
Copy link
Collaborator

auvipy commented Nov 22, 2022

all green now! now another round of review before merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants