fix: minor fixes
This commit is contained in:
parent
b4481dc92f
commit
4b9b805632
2 changed files with 8 additions and 9 deletions
|
|
@ -152,8 +152,7 @@ class ConnectorSharepoint:
|
|||
bool: True if successful, False otherwise
|
||||
"""
|
||||
target_folder = self.ctx.web.get_folder_by_server_relative_url(folder_path)
|
||||
buffer = BytesIO(content)
|
||||
target_folder.files.upload(buffer, file_name).execute_query()
|
||||
target_folder.upload_file(file_name, content).execute_query()
|
||||
return True
|
||||
|
||||
async def overwrite_file_async(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from dataclasses import dataclass
|
||||
from io import BytesIO
|
||||
from io import BytesIO, StringIO
|
||||
from typing import Any
|
||||
import pandas as pd
|
||||
from modules.shared.timezoneUtils import get_utc_now
|
||||
|
|
@ -251,8 +251,8 @@ class TicketSharepointSyncInterface:
|
|||
"" if jira_value is None else str(jira_value).strip()
|
||||
)
|
||||
|
||||
# Only include if values are different and CSV has non-empty value
|
||||
if csv_value != jira_value and csv_value:
|
||||
# Include if values are different (allow empty strings to clear fields like the reference does)
|
||||
if csv_value != jira_value:
|
||||
task_changes[field_name] = csv_value
|
||||
|
||||
if task_changes:
|
||||
|
|
@ -538,7 +538,7 @@ class TicketSharepointSyncInterface:
|
|||
[header_row1, header_row2, table_headers, df], ignore_index=True
|
||||
)
|
||||
|
||||
# Convert to CSV bytes
|
||||
csv_buffer = BytesIO()
|
||||
final_df.to_csv(csv_buffer, index=False, header=False)
|
||||
return csv_buffer.getvalue()
|
||||
# Convert to CSV bytes (write text, then encode)
|
||||
csv_text = StringIO()
|
||||
final_df.to_csv(csv_text, index=False, header=False)
|
||||
return csv_text.getvalue().encode("utf-8")
|
||||
|
|
|
|||
Loading…
Reference in a new issue