Skip to content

Error while rendering empty record from db #24

@maartends

Description

@maartends

I have one model (RelTag) with only two fields, both of which are nullable. When an empty record is being created through the fa.jquery /admin following error is produced when later trying to open this empty record for editing.

I am using:

  • pyramid 1.4
  • fa.jquery 0.9.5
  • pyramid-formalchemy 0.4.3
  • SQLAlchemy 0.7.6
    on Postgresql 8.4.

TypeError: coercing to Unicode: need string or buffer, NoneType found

  • Expression: "unicode(request.model_instance)"
  • Filename: ... uery-0.9.5-py2.6.egg/fa/jquery/templates/admin/master.pt
  • Location: (42:31)
  • Source: tal:replace="unicode(request.model_instance)"/>
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • Arguments: fs: <FieldSet - at 0x4729d10>
    model_plural: RelTags
    actions: {...} (1)
    model_label: RelTag
    breadcrumb: <Actions - at 0x4a6d100>
    repeat: {...} (0)
    renderer_name: pyramid_formalchemy:templates/admin/edit.pt
    F_: <function translate at 0x4a701b8>
    id: 3
    req: <Request - at 0x4700650>
    renderer_info: <RendererHelper - at 0x428c610>
    request: <Request - at 0x4700650>
    context: <RelTagCustomModel_admin_edit_GET 3 at 0x4729310>
    model_class: <I18NModel RelTag at 0x4729590>
    main: <PageTemplateFile - at 0x471a5d0>
    model_name: RelTag
    view: <ModelView - at 0x4729510>

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