microsoftgraph / microsoftgraph/msgraph-sdk-python
JSON serialization exception when creating PlannerTask
Abierto
@rkodev ya está trabajando en esto.
Desde el 12/7/2024.
Needs: Attention :wave:
- Lenguaje dominante
- Python
- Estrellas
- 630
- Forks
- 96
- Merge medio
- 15 h 20 min
- PR fusionados (30 d)
- 3
Descripción
Sample Python code from this documentation page does not work if any of datetime-typed fields initialized.
Exception with message Object of type DateTime is not JSON serializable is thrown.
Non-working code:
graph_client = GraphServiceClient(credentials, scopes)
request_body = PlannerTask(
plan_id = "xqQg5FS2LkCp935s-FIFm2QAFkHM",
bucket_id = "hsOf2dhOJkqyYYZEtdzDe2QAIUCR",
title = "Update client list",
assignments = PlannerAssignments(
additional_data = {
"fbab97d0-4932-4511-b675-204639209557" : {
"@odata_type" : "#microsoft.graph.plannerAssignment",
"order_hint" : " !",
},
}
),
due_date_time = datetime(2023, 12, 31)
)
result = await graph_client.planner.tasks.post(request_body)
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.