Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CurrencyGuarantee model to be deleted #20

Open
shadiakiki1986 opened this issue Feb 12, 2018 · 1 comment
Open

CurrencyGuarantee model to be deleted #20

shadiakiki1986 opened this issue Feb 12, 2018 · 1 comment
Assignees

Comments

@shadiakiki1986
Copy link
Contributor

shadiakiki1986 commented Feb 12, 2018

also

  • replace the foreign key to CurrencyGuarantee with just the Currency model
  • rename SuperidToLoanLiability.currency to SuperidToLoanLiability.currency_liability for clarity
  • now you will have two ForeignKey entries to Currency, which will cause an error in django
    • the django error will also mention a field "related_name" which you can use to resolve the error
    • ya3ne something like
currency_liability = models.ForeignKey(Currency,blank=True, null=True, related_name="currency_liability")
currency_guarantee = models.ForeignKey(Currency,blank=True, null=True, related_name="currency_guarantee")
@shadiakiki1986
Copy link
Contributor Author

also make sure you remove it from the import script here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants