Skip to content

Object/obj resource creation duplication issue#82

Open
ConnorMac wants to merge 1 commit intomasterfrom
object-reference-fix
Open

Object/obj resource creation duplication issue#82
ConnorMac wants to merge 1 commit intomasterfrom
object-reference-fix

Conversation

@ConnorMac
Copy link
Copy Markdown
Contributor

No description provided.

@ConnorMac
Copy link
Copy Markdown
Contributor Author

The core of this issue is sub object calls adding a URL segment to the main resource class for each call made. Example: https://api.rehive.com/3/admin/accounts/K9VE7ACCK3/K9VE7ACCK3/K9VE7ACCK3/

To replicate this issue a sub object call issue

currencies = ['AMD','ANG']

# Add the currencies to the account.
for code in currencies:
    rehive.admin.accounts.obj(
        'K9VE7ACCK3'
    ).currencies.create(
        currency='BSD'
    )

account = rehive.admin.accounts.create()

This will add two K9VE7ACCK3 segments as it loops through twice and calls the .obj.currencies.create twice.

@ConnorMac ConnorMac changed the title Added comments to object reference code and reverted to fixed logic Object/obj resource creation duplication issue Dec 22, 2020
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.

1 participant