Skip to content

Back-end can't handle formatter suffixes #3348

@maxpatiiuk

Description

@maxpatiiuk

When formatter includes a field that does not have a field name and exists just to provide a separator, back-end fails. Example Formatter:

	<format
	  name="Agent"
	  title="Agent"
	  class="edu.ku.brc.specify.datamodel.Agent"
	  default="true"
	>
		<switch single="false" field="agentType">
			<fields value="0">
				<field>firstName</field>
			</fields>
			<fields value="1">
				<field>firstName</field>
				<field sep=":||">firstName</field>
				<field sep=" *">agentType</field>
<!-- It fails because of the following field: -->
				<field sep=" "/>
			</fields>
			<fields value="2">
				<field>lastName</field>
			</fields>
		</switch>
	</format>

Back-end should be modified to handle this case

See #3309 (comment)

Fails on line this line:

path = fieldNode.text.split('.')

Metadata

Metadata

Assignees

No one assigned

    Labels

    1 - RequestA request made by a member of the community2 - QueriesIssues that are related to the query builder or queries in general

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions