marmelab / marmelab/ng-admin

Can't update a referenced field after the reference was deleted

Open
#1,389 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3.9k
Forks
703
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
Description

When an entity contains a reference to another entity, deleting the referenced entity makes it no longer possible to edit the referenced field.

Steps to Reproduce
  1. Run the ng-admin-demo
  2. Go to Catalog > Posters
  3. Pick any poster, click edit and check that you can update the Category field
  4. Go to Catalog > Categories
  5. Pick any category and delete it
  6. Go to Catalog > Posters
  7. Pick a poster that previously had the category you just deleted and click edit
  8. Try to update the Category field

ng-admin-bug

Expected behavior: The field should be editable

Actual behavior: The field can no longer be updated

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running ng-admin-demo and reproducing the issue through Catalog > Posters and Catalog > Categories. Trace the Category field behavior after its referenced category is deleted, then verify that the field can still be edited and updated for the affected poster.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.