Skip to content

Commit

Permalink
Merge pull request #199 from thakurpriya1990/working
Browse files Browse the repository at this point in the history
resolve bug email_user.addresses.all()
  • Loading branch information
xzzy authored Dec 6, 2023
2 parents 6448e31 + 4dd973a commit 3f3afe7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
8 changes: 5 additions & 3 deletions boranga/components/conservation_status/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,12 @@ def applicant_email(self):
def applicant_details(self):
if self.submitter:
email_user = retrieve_email_user(self.submitter)
return "{} {}\n{}".format(
print(email_user)
return "{} {}".format(
email_user.first_name,
email_user.last_name,
email_user.addresses.all().first())
email_user.last_name)
# Priya commented the below as gives error on UAT and Dev only on external side
# email_user.addresses.all().first())

@property
def applicant_address(self):
Expand Down
8 changes: 5 additions & 3 deletions boranga/components/occurrence/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ def applicant_email(self):
def applicant_details(self):
if self.submitter:
email_user = retrieve_email_user(self.submitter)
return "{} {}\n{}".format(
print(email_user)
return "{} {}".format(
email_user.first_name,
email_user.last_name,
email_user.addresses.all().first())
email_user.last_name)
# Priya commented the below as gives error on UAT and Dev only on external side
# email_user.addresses.all().first())

@property
def applicant_address(self):
Expand Down
13 changes: 6 additions & 7 deletions boranga/frontend/boranga/src/components/common/component_map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
>
<div class="row">
<div class="col-md-3">
<label for=""
>Type {{ filterApplicationsMapApplicationType }}</label
>
<label for="">Type</label>
<select
v-model="filterApplicationsMapApplicationType"
class="form-control"
Expand Down Expand Up @@ -1074,9 +1072,9 @@ export default {
// },
// filterInformation: function () {
// if (this.proposals.length === this.filteredProposals.length) {
// return ' (Showing all Applications)';
// return ` (Showing all ${this.proposals.length} Proposals)`;
// } else {
// return ` (Showing ${this.filteredProposals.length} of ${this.proposals.length} Applications)`;
// return ` (Showing ${this.filteredProposals.length} of ${this.proposals.length} Proposals)`;
// }
// },
canUndoAction: function () {
Expand Down Expand Up @@ -1364,7 +1362,7 @@ export default {
// this.filteredProposals = [
// ...this.filteredProposals.filter(
// (proposal) =>
// new Date(proposal.lodgement_date) >=
// new Date(proposal.lodgement_date) <=
// new Date(this.filterApplicationsMapLodgedTo)
// ),
// ];
Expand Down Expand Up @@ -2380,11 +2378,12 @@ export default {
console.log(
'Done loading features and applying filters'
);
vm.fetchingProposals = false;
});
})
.catch((error) => {
console.error('There was an error!', error);
})
.finally(() => {
vm.fetchingProposals = false;
});
},
Expand Down

0 comments on commit 3f3afe7

Please sign in to comment.