GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug] create_org may not work due to limited return size. · Issue #459 · code42/py42

[Bug] create_org may not work due to limited return size. #459

New issue
Copy link
New issue
Copy link
Open
Open
[Bug] create_org may not work due to limited return size.#459
Copy link
Labels
bugSomething isn't working

Description

@csanders-git
csanders-git
opened on Sep 17, 2023
Issue body actions

Description

create_org() calls _get_guid_by_id() with id_key="orgUid". This triggers the following code:

 if id_key != "orgId":
            guid = ""
            page = self.get_page()
            for org in page["orgs"]:
                if org[id_key] == org_id:
                    return org["orgGuid"]
            if not guid:
                raise Py42Error(f"Couldn't find an Org with ID '{org_id}'.")

This code calls self.get_page() which will only return the first 500. If the uid being searched for is not in the first 500 this will return an error even if the org exists. In our example org this included the parent org ID.

Steps to Reproduce

  1. Have an org with over 500 orgs
  2. Create an org with the parent of one of those not returned in the first 500
  3. An error will occur

Expected Behavior

Org will be created

Actual Behavior

Py42Error is thrown

Basic Information

  • py42 version: 1.26.1
  • python version: 3.11.4
  • operating system: MacOS

Activity

  1. csanders-git
    added
    bugSomething isn't working
    on Sep 17, 2023
  2. csanders-git
    added a commit that references this issue on Sep 17, 2023

    Support creation of orgs for tenants with greater than 500

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.