mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-29 00:11:28 +00:00
fix license type on edit
This commit is contained in:
parent
2c9c174ed8
commit
523fdf694b
1 changed files with 5 additions and 2 deletions
|
@ -22,7 +22,7 @@ import { selectosNotificationsEnabled } from 'redux/selectors/settings';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { CC_LICENSES, COPYRIGHT, OTHER } from 'constants/licenses';
|
import { CC_LICENSES, COPYRIGHT, OTHER, NONE, PUBLIC_DOMAIN } from 'constants/licenses';
|
||||||
|
|
||||||
type Action = UpdatePublishFormAction | { type: ACTIONS.CLEAR_PUBLISH };
|
type Action = UpdatePublishFormAction | { type: ACTIONS.CLEAR_PUBLISH };
|
||||||
|
|
||||||
|
@ -179,8 +179,11 @@ export const doPrepareEdit = (claim: any, uri: string) => (dispatch: Dispatch<Ac
|
||||||
};
|
};
|
||||||
|
|
||||||
// Make sure custom liscence's are mapped properly
|
// Make sure custom liscence's are mapped properly
|
||||||
|
// If the license isn't one of the standard licenses, map the custom license and description/url
|
||||||
if (!CC_LICENSES.some(({ value }) => value === license)) {
|
if (!CC_LICENSES.some(({ value }) => value === license)) {
|
||||||
if (!licenseUrl) {
|
if (!license || license === NONE || license === PUBLIC_DOMAIN) {
|
||||||
|
publishData.licenseType = license;
|
||||||
|
} else if (license && !licenseUrl && license !== NONE) {
|
||||||
publishData.licenseType = COPYRIGHT;
|
publishData.licenseType = COPYRIGHT;
|
||||||
} else {
|
} else {
|
||||||
publishData.licenseType = OTHER;
|
publishData.licenseType = OTHER;
|
||||||
|
|
Loading…
Add table
Reference in a new issue