mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
explicity state customer format for new APIs and cleanup as necessary
This commit is contained in:
@@ -12,8 +12,11 @@ from gam.gapi import errors as gapi_errors
|
|||||||
from gam.gapi import cloudidentity as gapi_cloudidentity
|
from gam.gapi import cloudidentity as gapi_cloudidentity
|
||||||
|
|
||||||
def _get_customerid():
|
def _get_customerid():
|
||||||
''' returns customer in format needed for this API'''
|
''' returns customer in "customers/(C){customer_id}' format needed for this API'''
|
||||||
return f'customers/{GC_Values[GC_CUSTOMER_ID]}'
|
customer = GC_Values[GC_CUSTOMER_ID]
|
||||||
|
if customer != MY_CUSTOMER and customer[0] != 'C':
|
||||||
|
customer = 'C' + customer
|
||||||
|
return f'customers/{customer}'
|
||||||
|
|
||||||
def _reduce_name(name):
|
def _reduce_name(name):
|
||||||
''' converts long name into email address'''
|
''' converts long name into email address'''
|
||||||
|
|||||||
@@ -10,8 +10,10 @@ from gam.gapi.directory import orgunits as gapi_directory_orgunits
|
|||||||
|
|
||||||
|
|
||||||
def _get_customerid():
|
def _get_customerid():
|
||||||
''' returns customer in format needed for this API'''
|
''' returns customer in "customers/C{customer}" format needed for this API'''
|
||||||
customer = GC_Values[GC_CUSTOMER_ID]
|
customer = GC_Values[GC_CUSTOMER_ID]
|
||||||
|
if customer != MY_CUSTOMER and customer[0] != 'C':
|
||||||
|
customer = 'C' + customer
|
||||||
return f'customers/{customer}'
|
return f'customers/{customer}'
|
||||||
|
|
||||||
def _get_printer_attributes(i, cdapi=None):
|
def _get_printer_attributes(i, cdapi=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user