Commit dc9474fb authored by Fatih Acet's avatar Fatih Acet

MRWidget: Remove approved from serializer.

parent ffaccec7
......@@ -31,7 +31,7 @@ export default class MergeRequestStore extends CEMergeRequestStore {
}
initApprovals(data) {
this.isApproved = data.approved || false;
this.isApproved = this.isApproved || false;
this.approvals = this.approvals || null;
this.approvalsPath = data.approvals_path || this.approvalsPath;
this.approvalsRequired = Boolean(this.approvalsPath);
......@@ -40,7 +40,7 @@ export default class MergeRequestStore extends CEMergeRequestStore {
setApprovals(data) {
this.approvals = data;
this.approvalsLeft = !!data.approvals_left;
this.isApproved = data.approved || !this.approvalsLeft || false;
this.isApproved = !this.approvalsLeft || false;
this.preventMerge = this.approvalsRequired && this.approvalsLeft;
}
}
......@@ -21,7 +21,6 @@ class MergeRequestEntity < IssuableEntity
expose :rebase_commit_sha
expose :rebase_in_progress?, as: :rebase_in_progress
expose :should_be_rebased?, as: :should_be_rebased
expose :approved?, as: :approved
expose :ff_only_enabled do |merge_request|
merge_request.project.merge_requests_ff_only_enabled
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment