Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Removing URL link for C1 #373

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/xero/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def __construct_bill(self, bill: Bill, bill_lineitems: List[BillLineItem]) -> Di
settings.FYLE_APP_URL,
bill_lineitems[0].expense.report_id,
workspace.fyle_org_id,
),
) if settings.BRAND_ID == 'fyle' else None,
Copy link

Choose a reason for hiding this comment

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

Consider using an f-string for better readability and performance.

- "Url": "{}/app/admin/#/reports/{}?org_id={}".format(
-     settings.FYLE_APP_URL,
-     bill_lineitems[0].expense.report_id,
-     workspace.fyle_org_id,
- ) if settings.BRAND_ID == 'fyle' else None,
+ "Url": f"{settings.FYLE_APP_URL}/app/admin/#/reports/{bill_lineitems[0].expense.report_id}?org_id={workspace.fyle_org_id}" if settings.BRAND_ID == 'fyle' else None,
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
) if settings.BRAND_ID == 'fyle' else None,
) if settings.BRAND_ID == 'fyle' else None,
"Url": f"{settings.FYLE_APP_URL}/app/admin/#/reports/{bill_lineitems[0].expense.report_id}?org_id={workspace.fyle_org_id}" if settings.BRAND_ID == 'fyle' else None,
Tools
Ruff

577-581: Use f-string instead of format call (UP032)

Convert to f-string

"LineAmountTypes": "Exclusive"
if general_settings.import_tax_codes
else "NoTax",
Expand Down Expand Up @@ -703,7 +703,7 @@ def __construct_bank_transaction(
settings.FYLE_APP_URL,
bank_transaction_lineitems[0].expense.expense_id,
workspace.fyle_org_id,
),
) if settings.BRAND_ID == 'fyle' else None,
Copy link

Choose a reason for hiding this comment

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

Update string formatting to use f-strings for consistency and performance.

- "Url": "{}/app/admin/#/view_expense/{}?org_id={}".format(
-     settings.FYLE_APP_URL,
-     bank_transaction_lineitems[0].expense.expense_id,
-     workspace.fyle_org_id,
- ) if settings.BRAND_ID == 'fyle' else None,
+ "Url": f"{settings.FYLE_APP_URL}/app/admin/#/view_expense/{bank_transaction_lineitems[0].expense.expense_id}?org_id={workspace.fyle_org_id}" if settings.BRAND_ID == 'fyle' else None,
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
) if settings.BRAND_ID == 'fyle' else None,
"Url": f"{settings.FYLE_APP_URL}/app/admin/#/view_expense/{bank_transaction_lineitems[0].expense.expense_id}?org_id={workspace.fyle_org_id}" if settings.BRAND_ID == 'fyle' else None,
Tools
Ruff

702-706: Use f-string instead of format call (UP032)

Convert to f-string

"LineAmountTypes": "Exclusive"
if general_settings.import_tax_codes
else "NoTax",
Expand Down
Loading