Skip to content

Commit

Permalink
refactor: some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Nov 28, 2023
1 parent b4e3636 commit e0b1756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/models/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const getFieldFilterFromPath = (
return recur(resolvePath(path), 0)
}

export const getSchemaPropertyFromPath = (
export const getSchemaPropertyForPath = (
schema: Schema,
path: string
): SchemaFieldProperty | undefined => {
Expand All @@ -76,7 +76,7 @@ export const getSchemaPropertyFromPath = (
}

export const getFieldFilter = (schema: Schema, path: string) => {
const schemaProperty = getSchemaPropertyFromPath(schema, path)
const schemaProperty = getSchemaPropertyForPath(schema, path)

if (schemaProperty?.propertyType === SchemaFieldPropertyType.REFERENCE) {
return `${schemaProperty.fieldName}[id, displayName]`
Expand Down
1 change: 0 additions & 1 deletion src/pages/dataElements/List.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import userEvent from '@testing-library/user-event'
import React from 'react'
import dataElementSchemaMock from '../../__mocks__/schema/dataElementsSchema.json'
// import { useModelListView } from '../../components/sectionList/listView'
import { SECTIONS_MAP } from '../../lib'
import { useSchemaStore } from '../../lib/schemas/schemaStore'
import { ModelSchemas } from '../../lib/useLoadApp'
Expand Down

0 comments on commit e0b1756

Please sign in to comment.