sailpoint-oss / python-sdk

MIT License
6 stars 3 forks source link

list_campaign_templates(): NameError: name 'Campaign' is not defined #20

Closed scott-fehrman-sp closed 2 months ago

scott-fehrman-sp commented 4 months ago

Run: python3 test_CertCampaignTemplates.py

Program:

from typing import List
import sailpoint.v3
import sailpoint.beta
import json
from sailpoint.configuration import Configuration
from pydantic import StrictStr

configuration = Configuration()

results: List[sailpoint.v3.CampaignTemplate] = None
result: sailpoint.v3.CampaignTemplate = None

with sailpoint.v3.ApiClient(configuration) as api_client:
    results = sailpoint.v3.CertificationCampaignsApi(api_client).list_campaign_templates() # ERROR
    result = results[0]
    print(result.model_dump_json(by_alias=True, indent=4))

Output:

name 'Campaign' is not defined
   File "/Documents/Projects/Python/python-example/test_CertCampaignTemplates.py", line 14, in <module>
     results = sailpoint.v3.CertificationCampaignsApi(api_client).list_campaign_templates()
NameError: name 'Campaign' is not defined
tyler-mairose-sp commented 2 months ago

This is fixed in https://github.com/sailpoint-oss/python-sdk/commit/8807d93736ad6c9dce5f3a4b3130451e5ca29cd1 and will be in the next release!