Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Missing identifier Field in LayoutDto for Novu Python SDK #295

Description

@Alleny244

Describe the bug

I'm encountering an issue with the Novu Python SDK while trying to create a layout. The API returns a 400 Bad Request error with the message indicating that the identifier should not be null or undefined and must be a string. However, the LayoutDto class in the SDK does not provide an option to pass the identifier, which seems to be required by the API.

Error Message

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.novu.co/v1/layouts {'message': ['identifier should not be null or undefined', 'identifier must be a string'], 'error': 'Bad Request', 'statusCode': 400}

To Reproduce

  1. Create a LayoutDto instance without an identifier field.
  2. Attempt to create a layout using the Novu Python SDK.
  3. Observe the 400 Bad Request error.

Expected behavior

The layout should be created successfully without a 400 Bad Request error.

Screenshots

The API returns a 400 Bad Request error indicating that the identifier field is missing.
Screenshot 2024-06-19 at 4 57 00 PM

Versions

  • Novu version: Novu SaaS
  • Python version: 3.12.3
  • Novu-python version: 1.14.0

Additional context
I have added a fix for the same
Pull request for the fix : pull-294

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions